Skip to content

Commit db29609

Browse files
committed
Handle None in local change
1 parent edbf0bd commit db29609

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

mergin/client_pull.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,10 @@ def pull_project_async(mc, directory) -> Optional[PullJob]:
543543
# find corresponding local delta item
544544
local_item = next((i for i in local_delta if i.path == change.path), None)
545545
local_item_change = local_item.type if local_item else None
546+
local_item_checksum = local_item.checksum if local_item else None
546547

547548
# compare server and local changes to decide what to do in pull
548-
pull_action_type = mp.get_pull_action(
549-
change.type, local_item_change, change.checksum, local_item.checksum if local_item else None
550-
)
549+
pull_action_type = mp.get_pull_action(change.type, local_item_change, change.checksum, local_item_checksum)
551550
if not pull_action_type:
552551
continue # no action needed
553552

0 commit comments

Comments
 (0)