fix(api): Dont try to access attribute if not exist in common viewset
ref: #761
This commit is contained in:
@ -841,7 +841,7 @@ class SubModelViewSet(
|
||||
|
||||
if(
|
||||
str(
|
||||
related_model._meta.sub_model_type
|
||||
getattr(related_model, '._meta.sub_model_type', '')
|
||||
).lower().replace(' ', '_') == model_kwarg
|
||||
):
|
||||
|
||||
|
Reference in New Issue
Block a user