Skip to content

Commit

Permalink
fix(events.py): handle TypeError in trash_conflicts update
Browse files Browse the repository at this point in the history
Handle both KeyError and TypeError in updating trash_conflicts
to ensure robustness.
  • Loading branch information
atompie committed Sep 5, 2024
1 parent d6fcf7f commit 16a0c9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tracardi/service/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def copy_default_event_to_profile(copy_schema: dict, flat_profile: FlatProfile,

try:
trash_conflicts = flat_profile['trash']['conflicts']
except KeyError:
except (KeyError, TypeError):
trash_conflicts = {}

trash_conflicts.update(conflicts)
Expand Down

0 comments on commit 16a0c9c

Please sign in to comment.