mirror of
https://github.com/jazzband/django-ddp.git
synced 2026-05-11 17:13:14 +00:00
Gracefully handle poorly registered instance methods that take no args (ie: missing self arg)
This commit is contained in:
parent
97cc333c5e
commit
1e99b0c396
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ def validate_kwargs(func, kwargs):
|
|||
defaults = list(argspec.defaults or [])
|
||||
|
||||
# ignore implicit 'self' argument
|
||||
if inspect.ismethod(func) and all_args[0] == 'self':
|
||||
if inspect.ismethod(func) and all_args[:1] == ['self']:
|
||||
all_args[:1] = []
|
||||
|
||||
# don't require arguments that have defaults
|
||||
|
|
|
|||
Loading…
Reference in a new issue