mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-07 13:54:47 +03:00
Better to check of existence of signature
This commit is contained in:
parent
974b94dfd7
commit
610e8ca75c
|
@ -141,7 +141,7 @@ def value_from_object(field, obj):
|
|||
|
||||
|
||||
def getargspec(obj): # type: tuple
|
||||
if six.PY2:
|
||||
if not hasattr(inspect, 'signature'):
|
||||
parameters, _, _, defaults = inspect.getargspec(obj)
|
||||
else:
|
||||
signature = inspect.signature(obj)
|
||||
|
|
Loading…
Reference in New Issue
Block a user