diff --git a/taiga/timeline/management/commands/clear_unnecessary_new_membership_entries.py b/taiga/timeline/management/commands/clear_unnecessary_new_membership_entries.py index 2fde9a8d..f9b65dcf 100644 --- a/taiga/timeline/management/commands/clear_unnecessary_new_membership_entries.py +++ b/taiga/timeline/management/commands/clear_unnecessary_new_membership_entries.py @@ -30,7 +30,7 @@ class Command(BaseCommand): removing_timeline_ids = [] for t in Timeline.objects.filter(event_type="projects.membership.create").order_by("created"): print(t.created) - if t.project.owner.id == t.data["user"]["id"]: + if t.project.owner.id == t.data["user"].get("id", None): removing_timeline_ids.append(t.id) Timeline.objects.filter(id__in=removing_timeline_ids).delete()