fix(api): Dont try to access attribute if not exist in common viewset

ref: #761
This commit is contained in:
2025-05-15 20:19:43 +09:30
parent e295e53f86
commit 3c19e9d4cf

View File

@ -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
):