diff --git a/watson/models.py b/watson/models.py index 1dde609..d226726 100644 --- a/watson/models.py +++ b/watson/models.py @@ -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) ) )