We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23c8876 commit b7abe3eCopy full SHA for b7abe3e
1 file changed
linode_api4/objects/base.py
@@ -408,15 +408,14 @@ def _populate(self, json):
408
self._set("_raw_json", json)
409
self._set("_updated", False)
410
411
+ valid_keys = set(
412
+ k
413
+ for k, v in type(self).properties.items()
414
+ if (not v.identifier) and (not v.alias_of)
415
+ ) | set(self.properties_with_alias.keys())
416
+
417
for api_key in json:
- if api_key in chain(
- (
- k
- for k, v in type(self).properties.items()
- if (not v.identifier) and (not v.alias_of)
- ), # Exclude identifiers and aliased properties to avoid conflicts with API attributes
418
- self.properties_with_alias.keys(),
419
- ):
+ if api_key in valid_keys:
420
prop = type(self).properties.get(api_key)
421
prop_key = api_key
422
0 commit comments