Skip to content

Commit

Permalink
fix requirement translation regression
Browse files Browse the repository at this point in the history
fix requirement translation regression
  • Loading branch information
eric-intuitem committed Dec 12, 2024
1 parent 16f2350 commit d0bfb4d
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions backend/core/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,14 +621,11 @@ class Meta:


class RequirementAssessmentReadSerializer(BaseModelSerializer):
name = serializers.CharField(source="__str__")
description = serializers.CharField(source="get_requirement_description")
evidences = FieldsRelatedField(many=True)
compliance_assessment = FieldsRelatedField()
folder = FieldsRelatedField()
assessable = serializers.BooleanField(source="requirement.assessable")
requirement = FieldsRelatedField(
[

class FilteredNodeSerializer(RequirementNodeReadSerializer):
class Meta:
model = RequirementNode
fields = [
"id",
"urn",
"annotation",
Expand All @@ -640,7 +637,14 @@ class RequirementAssessmentReadSerializer(BaseModelSerializer):
"associated_threats",
"parent_requirement",
]
)

name = serializers.CharField(source="__str__")
description = serializers.CharField(source="get_requirement_description")
evidences = FieldsRelatedField(many=True)
compliance_assessment = FieldsRelatedField()
folder = FieldsRelatedField()
assessable = serializers.BooleanField(source="requirement.assessable")
requirement = FilteredNodeSerializer()

class Meta:
model = RequirementAssessment
Expand Down

0 comments on commit d0bfb4d

Please sign in to comment.