Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
knokko committed Mar 21, 2024
1 parent 3799849 commit b343306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binder/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def _commit():
relation_changes = dict()
for (model, oid), fields in changed_objs.items():
for field in model._meta.get_fields():
if field.auto_created and not field.concrete and not field.many_to_many and field.related_model.Binder.history:
if field.auto_created and not field.concrete and not field.many_to_many and hasattr(field.related_model, 'Binder') and field.related_model.Binder.history:
related_field = field.field.name + '_id'
related_objects = list(field.related_model.objects.filter(**{related_field: oid}).all())
for related_object in related_objects:
Expand Down

0 comments on commit b343306

Please sign in to comment.