Skip to content

Commit

Permalink
Fix empty commits are created (#302)
Browse files Browse the repository at this point in the history
The wrong operator has been used to get the attributes to log
  • Loading branch information
kofrezo committed Mar 24, 2023
1 parent 54bd54b commit e1d776d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serveradmin/serverdb/query_committer.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def _log_changes(user, app, changed, created_objects, deleted_objects):
excl_attrs = Attribute.objects.filter(history=False).values_list(flat=True)
for updates in changed:
# At least one attribute aside from object_id has changed.
if len(updates.keys() ^ excl_attrs) > 1:
if len(updates.keys() - excl_attrs) > 1:
# Get changes for attributes that should be logged.
to_log = {k: v for k, v in updates.items() if k not in excl_attrs}
changes.append(Change(
Expand Down

0 comments on commit e1d776d

Please sign in to comment.