fix(api): check if model has notes enabled before adding url to body

ref:
This commit is contained in:
2025-06-02 05:43:02 +09:30
parent 6f66b4cf95
commit 91b33be834

View File

@ -156,7 +156,7 @@ class CommonModelSerializer(CommonBaseSerializer):
kwargs = item.get_url_kwargs_notes()
)
elif hasattr(self.Meta.model, '_notes_enabled'):
elif getattr(self.Meta.model, '_notes_enabled', False):
get_url['notes'] = reverse(
"v2:_api_centurionmodelnote_sub-list",