mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
This commit is contained in:
parent
0ec4dc91e0
commit
8838d4dd49
41 changed files with 147 additions and 243 deletions
|
@ -40,12 +40,10 @@ class Person(models.Model):
|
|||
# calls. This argument is used to establish that the BookManager
|
||||
# is actually getting used when it should be.
|
||||
class BookManager(models.Manager):
|
||||
def create(self, *args, **kwargs):
|
||||
kwargs.pop('extra_arg', None)
|
||||
def create(self, *args, extra_arg=None, **kwargs):
|
||||
return super().create(*args, **kwargs)
|
||||
|
||||
def get_or_create(self, *args, **kwargs):
|
||||
kwargs.pop('extra_arg', None)
|
||||
def get_or_create(self, *args, extra_arg=None, **kwargs):
|
||||
return super().get_or_create(*args, **kwargs)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue