Skip to content

Commit

Permalink
mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajtmccarty committed Aug 30, 2024
1 parent 1497b8c commit 688a516
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/infrahub/core/diff/combiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _combine_cardinality_one_relationship_elements(
if combined_action is DiffAction.REMOVED:
for element in ordered_elements:
for prop in element.properties:
if prop.property_type is DatabaseEdgeType.IS_RELATED and prop.action is DiffAction.UPDATED:
if prop.property_type is DatabaseEdgeType.IS_RELATED and prop.action is DiffAction.UPDATED and prop.previous_value:
peer_id = prop.previous_value
peer_label = prop.previous_label
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def initial_dataset(
manufacturer=dmc,
)
await delorean.save(db=db)
await delorean.previous_owner.update(db=db, data={"id": doc_brown.id, "_relation__is_protected": True})
await delorean.previous_owner.update(db=db, data={"id": doc_brown.id, "_relation__is_protected": True}) # type: ignore[attr-defined]
await delorean.save(db=db)

bus_simulator.service.cache = RedisCache()
Expand Down

0 comments on commit 688a516

Please sign in to comment.