Merge pull request #236 from zandeez/master

Update foreign key references for Django 2.0.
This commit is contained in:
Dave Hall 2018-02-12 13:20:23 +00:00 committed by GitHub
commit b21fc06891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def has_int_pk(model):
isinstance(pk, (models.IntegerField, models.AutoField)) and
not isinstance(pk, models.BigIntegerField)
) or (
isinstance(pk, models.ForeignKey) and has_int_pk(pk.rel.to)
isinstance(pk, models.ForeignKey) and has_int_pk(pk.remote_field.model)
)
)