Corrected exception handling in get_serializer_for_model()
This commit is contained in:
parent
d7e40de9da
commit
d334bd4477
|
|
@ -37,7 +37,7 @@ def get_serializer_for_model(model, prefix=''):
|
|||
)
|
||||
try:
|
||||
return dynamic_import(serializer_name)
|
||||
except ImportError:
|
||||
except AttributeError:
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue