feat(access): All Entity models to use the entity notes endpoint
ref: #707 #706
This commit is contained in:
@ -65,6 +65,8 @@ class Entity(
|
||||
|
||||
# app_namespace = 'access'
|
||||
|
||||
note_basename = '_api_v2_entity_note'
|
||||
|
||||
documentation = ''
|
||||
|
||||
page_layout: dict = []
|
||||
@ -87,7 +89,10 @@ class Entity(
|
||||
|
||||
if getattr(self, related_object.name, None):
|
||||
|
||||
if not str(related_object.name).endswith('history'):
|
||||
if(
|
||||
not str(related_object.name).endswith('history')
|
||||
and not str(related_object.name).endswith('notes')
|
||||
):
|
||||
|
||||
return related_object.name
|
||||
break
|
||||
|
@ -102,7 +102,7 @@ class CommonModelSerializer(CommonBaseSerializer):
|
||||
|
||||
note_basename = app_namespace + '_api_v2_' + str(item._meta.verbose_name).lower().replace(' ', '_') + '_note'
|
||||
|
||||
if hasattr(item, 'note_basename'):
|
||||
if getattr(item, 'note_basename'):
|
||||
|
||||
note_basename = app_namespace + item.note_basename
|
||||
|
||||
|
Reference in New Issue
Block a user