Skip to content

Commit

Permalink
fix: handle none
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Jun 17, 2024
1 parent 2784c1d commit b8f01c4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/uiprotect/data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ def update_from_dict(cls: ProtectObject, data: dict[str, Any]) -> ProtectObject:
for key, item in data.items():
if has_unifi_objs and key in unifi_objs and isinstance(item, dict):
if (unifi_obj := getattr(cls, key)) is not None:
item["api"] = api
value = unifi_obj.update_from_dict(item)
else:
value = None

Check warning on line 514 in src/uiprotect/data/base.py

View check run for this annotation

Codecov / codecov/patch

src/uiprotect/data/base.py#L514

Added line #L514 was not covered by tests
Expand Down

0 comments on commit b8f01c4

Please sign in to comment.