Skip to content

Commit

Permalink
Update simple_history/models.py
Browse files Browse the repository at this point in the history
Co-authored-by: Anders <[email protected]>
  • Loading branch information
mjsir911 and ddabble authored Aug 18, 2023
1 parent d8ecf1d commit 441c1fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions simple_history/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ def create_historical_record_m2ms(self, history_instance, instance):

insert_rows = []

# `m2m_field_name()` is part of Django's internal API
through_field_name = field.m2m_field_name()

rows = through_model.objects.filter(**{through_field_name: instance})
Expand Down

0 comments on commit 441c1fb

Please sign in to comment.