Skip to content

Commit

Permalink
fix(management): fix reversion user lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Apr 18, 2024
1 parent dde81ba commit 36b1588
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apis_ontology/management/commands/import.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ def import_entities(entities=[]):
timestamp = datetime.datetime.fromisoformat(revision["timestamp"])
newentity.history.filter(history_date__year=timestamp.year, history_date__month=timestamp.month, history_date__day=timestamp.day).delete()
newentity._history_date = timestamp
revision_user, _ = User.objects.get_or_create(username=revision["user"])
if revision.get("user") is not None:
revision_user, _ = User.objects.get_or_create(username=revision["user"])

newentity.save()
if revision_user:
Expand Down

0 comments on commit 36b1588

Please sign in to comment.