Skip to content

Commit 068f026

Browse files
committed
Make db_constraint unflagging backward compatible
1 parent 803ef9a commit 068f026

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simple_history/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ def get_history_user(self, instance):
220220
class CustomForeignKeyField(models.ForeignKey):
221221

222222
def __init__(self, *args, **kwargs):
223-
kwargs['db_constraint'] = False
224223
super(CustomForeignKeyField, self).__init__(*args, **kwargs)
224+
self.db_constraint = False
225225
self.generate_reverse_relation = False
226226

227227
def get_attname(self):

0 commit comments

Comments
 (0)