Corrected exception handling in get_serializer_for_model()

This commit is contained in:
Jeremy Stretch 2018-07-16 13:26:26 -04:00
parent d7e40de9da
commit d334bd4477

View File

@ -37,7 +37,7 @@ def get_serializer_for_model(model, prefix=''):
)
try:
return dynamic_import(serializer_name)
except ImportError:
except AttributeError:
return None