Skip to content

Commit

Permalink
map is not required for layer groups
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed May 16, 2024
1 parent de6ef15 commit e6a2c0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metadata_catalogue/maps/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ class Meta:


class LayerGroupSerializer(serializers.ModelSerializer):
map = serializers.SlugRelatedField(slug_field="slug", queryset=Map.objects.all(), allow_null=True)
parent = serializers.SlugRelatedField(slug_field="slug", queryset=LayerGroup.objects.all(), allow_null=True)
map = serializers.SlugRelatedField(slug_field="slug", queryset=Map.objects.all(), allow_null=True, required=False)
parent = serializers.SlugRelatedField(
slug_field="slug", queryset=LayerGroup.objects.all(), allow_null=True, required=False
)

class Meta:
model = LayerGroup
Expand Down

0 comments on commit e6a2c0f

Please sign in to comment.