mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
make raise_exception a keyword-only argument
This commit is contained in:
parent
431f7dfa3d
commit
edbb7a4c8f
|
@ -209,7 +209,7 @@ class BaseSerializer(Field):
|
||||||
|
|
||||||
return self.instance
|
return self.instance
|
||||||
|
|
||||||
def is_valid(self, raise_exception=False):
|
def is_valid(self, *, raise_exception=False):
|
||||||
assert hasattr(self, 'initial_data'), (
|
assert hasattr(self, 'initial_data'), (
|
||||||
'Cannot call `.is_valid()` as no `data=` keyword argument was '
|
'Cannot call `.is_valid()` as no `data=` keyword argument was '
|
||||||
'passed when instantiating the serializer instance.'
|
'passed when instantiating the serializer instance.'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user