diff --git a/apps/analysis/schema.py b/apps/analysis/schema.py index 511d920748..88803b9146 100644 --- a/apps/analysis/schema.py +++ b/apps/analysis/schema.py @@ -206,7 +206,7 @@ class Meta: type('FilterDataType', (graphene.ObjectType,), { 'id': graphene.String(), 'key': graphene.String(), - 'unique_id': graphene.String() + 'uniqueId': graphene.String() }))) # XXX: N+1 and No pagination diff --git a/apps/analysis/serializers.py b/apps/analysis/serializers.py index fe6fe76d1b..18ebbc3900 100644 --- a/apps/analysis/serializers.py +++ b/apps/analysis/serializers.py @@ -333,6 +333,7 @@ def validate(self, data): class AnalysisPillarGqlSerializer(TempClientIdMixin, UserResourceSerializer): id = IntegerIDField(required=False) statements = AnalyticalStatementGqlSerializer(many=True, source='analyticalstatement_set', required=False) + analysis = serializers.PrimaryKeyRelatedField(queryset=Analysis.objects.all(), required=False) class Meta: model = AnalysisPillar @@ -445,6 +446,7 @@ def create_or_update_pillar(self, pillar_data, instance): "title": pillar_data.get('title'), "assignee": pillar_data.get('assignee').id, "analysis": instance.id, + "filters": pillar_data.get('filters'), } pillar_id = pillar_data.get('id', None) if pillar_id: diff --git a/schema.graphql b/schema.graphql index 3c724a3b74..a67c964c2d 100644 --- a/schema.graphql +++ b/schema.graphql @@ -340,7 +340,7 @@ input AnalysisPillarGqlInputType { informationGap: String filters: GenericScalar assignee: ID! - analysis: ID! + analysis: ID clonedFrom: ID statements: [AnalyticalStatementGqlInputType!] clientId: String