Skip to content

Commit

Permalink
ToDo: improve the uniqueness of events
Browse files Browse the repository at this point in the history
  • Loading branch information
U039b committed Dec 29, 2024
1 parent 8d43d8f commit 0d59363
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions colander/core/rest/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ def update_or_create_event(entity: dict, entity_type, root_entity, case: Case, o
obj, created = Event.objects.update_or_create(
type=entity_type,
name=entity.get('name'),
# ToDo: unique together "type", "name", "first_seen", "last_seen", "involved_entity"
# 'first_seen': entity.get('first_seen'),
# 'last_seen': entity.get('last_seen'),
case=case,
defaults={
'owner': owner,
Expand Down

0 comments on commit 0d59363

Please sign in to comment.