Browse Source

Corrected exception handling in get_serializer_for_model()

Jeremy Stretch 7 years ago
parent
commit
d334bd4477
1 changed files with 1 additions and 1 deletions
  1. 1 1
      netbox/utilities/api.py

+ 1 - 1
netbox/utilities/api.py

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