diff --git a/backend/src/portal/governo/serializers/configure.zcml b/backend/src/portal/governo/serializers/configure.zcml index 79aacf8..cc60787 100644 --- a/backend/src/portal/governo/serializers/configure.zcml +++ b/backend/src/portal/governo/serializers/configure.zcml @@ -2,6 +2,10 @@ + + + + dict: + result = super().__call__(*args, **kwds) + result["cor"] = "blue" + result["referencias"] = {} + for relation in api.relation.get(target=self.context): + atributo = relation.from_attribute + fonte = relation.from_object + if atributo not in result["referencias"]: + result["referencias"][atributo] = [] + dados = getMultiAdapter((fonte, self.request), ISerializeToJsonSummary)() + result["referencias"][atributo].append(dados) + return result