Open etj opened 1 week ago
I checked a bit the issue. Since maps are the only one that in creations called the API/v2 the error is raised because it tries to calculate the permissions before save the resource. To fix this we have two options: 1) Ignore the value in creation and use the default value. Later will be the user from the metadata editor to change this
2) Move this in the save method of the ResourceBaseSerializer.
The second should work, but i notice that the client always send the information of the is_approved, is_published and featured as false (on development demo/master)
This is an issue since we cannot rely on the client. If the client serve the default value is_approved=True
, is_published =True
and featured=False
A PR with the changes is here but since the client always send the FALSE, is like to have the ADW always activated. Do you think (before opening any issue on the mapstore-client repo) that this could be a valid solution?
This is an issue since we cannot rely on the client. If the client serve the default value is_approved=True, is_published =True and featured=False
I'm not sure what you mean here. Why can't we rely on the client? The user that creates the new map has permission to set these values, so why can't we rely on them? The user could decide to set them before saving the map for the first time.
I agree that the client should set different defaults, but that's a different story.
As agreed @mattiagiupponi the client will not include those properties when a new map is created (https://github.com/GeoNode/geonode-mapstore-client/issues/1856). If the properties are missing the backend will assign the default values
The POST to https://development.demo.geonode.org/api/v2/maps receives a 500 response
Log says: