Skip to content

Commit

Permalink
fix overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Jan 8, 2024
1 parent 2b1b2aa commit 535b9b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/design/plone/ctgeneric/restapi/serializer/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
@implementer(ISerializeToJsonSummary)
@adapter(Interface, IDesignPloneCtgenericLayer)
class DefaultJSONSummarySerializer(BaseSerializer):
def __call__(self, force_all_metadata=False):
res = super().__call__(force_all_metadata=force_all_metadata)
def __call__(self, **kwargs):
res = super().__call__(**kwargs)
if self.context.portal_type == "Persona":
res["ruolo"] = getattr(self.context, "ruolo", "")
res["incarichi"] = getattr(self.context, "ruolo", "")
Expand All @@ -25,8 +25,8 @@ def __call__(self, force_all_metadata=False):
@implementer(ISerializeToJsonSummary)
@adapter(IPersona, IDesignPloneCtgenericLayer)
class PersonaDefaultJSONSummarySerializer(BasePersonaSerializer):
def __call__(self, force_all_metadata=False):
res = super().__call__(force_all_metadata=force_all_metadata)
def __call__(self, **kwargs):
res = super().__call__(**kwargs)
res["ruolo"] = getattr(self.context, "ruolo", "")
res["incarichi"] = getattr(self.context, "ruolo", "")
return res

0 comments on commit 535b9b7

Please sign in to comment.