Skip to content

Commit f4bcf7d

Browse files
committed
Also look for ForeignObject when looking for ForeignKeys
1 parent 73326fa commit f4bcf7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pylint_django/augmentations/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ class ModelB(models.Model):
128128
if (node_is_subclass(cls,
129129
'django.db.models.manager.Manager',
130130
'django.db.models.base.Model',
131-
'.Model')):
131+
'.Model',
132+
'django.db.models.fields.related.ForeignObject')):
132133
# This means that we are looking at a subclass of models.Model
133134
# and something is trying to access a <something>_set attribute.
134135
# Since this could exist, we will return so as not to raise an

0 commit comments

Comments
 (0)