diff --git a/pylint_django/augmentations/__init__.py b/pylint_django/augmentations/__init__.py index 473ebc80..427a37ef 100644 --- a/pylint_django/augmentations/__init__.py +++ b/pylint_django/augmentations/__init__.py @@ -44,6 +44,7 @@ 'extra', 'get', 'get_or_create', + 'update_or_create', 'get_queryset', 'create', 'bulk_create', diff --git a/pylint_django/tests/input/func_noerror_foreign_key_sets.py b/pylint_django/tests/input/func_noerror_foreign_key_sets.py index 22ce18bc..a5cfeb3a 100644 --- a/pylint_django/tests/input/func_noerror_foreign_key_sets.py +++ b/pylint_django/tests/input/func_noerror_foreign_key_sets.py @@ -15,6 +15,9 @@ def get_others(self): def get_first(self): return self.othermodel_set.first() + def othermodel_update_or_create(self): + return self.othermodel_set.update_or_create() + class OtherModel(models.Model): count = models.IntegerField()