Skip to content

Commit

Permalink
Handle None case of MapLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
ridoo committed Aug 23, 2024
1 parent 98d786d commit ba1696f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geonode/maps/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def perform_create(self, serializer):
# Thumbnail will be handled later
post_creation_data = {"thumbnail": serializer.validated_data.pop("thumbnail_url", "")}
map_layers = serializer.validated_data.get("maplayers", [])
tabular_collection = all(("tabular" in layer.dataset.subtype) for layer in map_layers)
tabular_collection = all(layer.dataset and ("tabular" in layer.dataset.subtype) for layer in map_layers)

instance = serializer.save(
owner=self.request.user,
Expand Down

0 comments on commit ba1696f

Please sign in to comment.