Skip to content

Commit 6d151d8

Browse files
committed
Add test for Model.objects.get_or_create(). Closes #156
the issue is not reproducible after the upgrade to pylint 2.0 where I deleted most of the transformations, including the offending one.
1 parent f809ee3 commit 6d151d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pylint_django/tests/input/func_noerror_model_methods.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class SomeModel(models.Model):
9-
pass
9+
name = models.CharField(max_length=64)
1010

1111

1212
if __name__ == '__main__':
@@ -18,3 +18,5 @@ class SomeModel(models.Model):
1818
# added in django 1.6
1919
FIRST = SomeModel.objects.first()
2020
LAST = SomeModel.objects.last()
21+
22+
DB_RECORD, CREATED = SomeModel.objects.get_or_create(name='Tester')

0 commit comments

Comments
 (0)