Skip to content

Commit 9c9b735

Browse files
author
Ross Mechanic
authored
Remove get_excluded_fields function from manager – shouldn't be part of public API (#515)
1 parent 9deb217 commit 9c9b735

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

simple_history/manager.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ def get_queryset(self):
3434
key_name = self.instance._meta.pk.name
3535
return self.get_super_queryset().filter(**{key_name: self.instance.pk})
3636

37-
def get_excluded_fields(self):
38-
return getattr(self.model, "_history_excluded_fields", [])
39-
4037
def most_recent(self):
4138
"""
4239
Returns the most recent copy of the instance available in the history.
@@ -48,7 +45,7 @@ def most_recent(self):
4845
)
4946
)
5047
tmp = []
51-
excluded_fields = self.get_excluded_fields()
48+
excluded_fields = getattr(self.model, "_history_excluded_fields", [])
5249

5350
for field in self.instance._meta.fields:
5451
if field.name in excluded_fields:

0 commit comments

Comments
 (0)