Skip to content

Commit

Permalink
[Fixes #12674] store spatial file is always false during cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiagiupponi committed Oct 22, 2024
1 parent b6a26f3 commit e2d8ca7
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .env_dev
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ DEBUG=True

SECRET_KEY='myv-y4#7j-d*p-__@j#*3z@!y24fz8%^z2v6atuy4bo9vqr1_a'

# STATIC_ROOT=/mnt/volumes/statics/static/
# MEDIA_ROOT=/mnt/volumes/statics/uploaded/
# GEOIP_PATH=/mnt/volumes/statics/geoip.db

CACHE_BUSTING_STATIC_ENABLED=False

Expand Down
2 changes: 1 addition & 1 deletion geonode/upload/handlers/common/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def extract_params_from_data(_data, action=None):
"""
if action == exa.COPY.value:
title = json.loads(_data.get("defaults"))
return {"title": title.pop("title")}, _data
return {"title": title.pop("title"), "store_spatial_file": True}, _data

return {
"skip_existing_layers": _data.pop("skip_existing_layers", "False"),
Expand Down
2 changes: 1 addition & 1 deletion geonode/upload/handlers/common/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def extract_params_from_data(_data, action=None):
"""
if action == exa.COPY.value:
title = json.loads(_data.get("defaults"))
return {"title": title.pop("title")}, _data
return {"title": title.pop("title"), "store_spatial_file": True}, _data

return {
"source": _data.pop("source", "upload"),
Expand Down
4 changes: 2 additions & 2 deletions geonode/upload/handlers/common/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def extract_params_from_data(_data, action=None):
"""
if action == exa.COPY.value:
title = json.loads(_data.get("defaults"))
return {"title": title.pop("title")}, _data
return {"title": title.pop("title"), "store_spatial_file": True}, _data

return {
"skip_existing_layers": _data.pop("skip_existing_layers", "False"),
Expand Down Expand Up @@ -258,7 +258,7 @@ def perform_last_step(execution_id):
that the execution is completed
"""
_exec = BaseHandler.perform_last_step(execution_id=execution_id)
if _exec and not _exec.input_params.get("store_spatial_file", False):
if _exec and not _exec.input_params.get("store_spatial_file", True):
resources = ResourceHandlerInfo.objects.filter(execution_request=_exec)
# getting all assets list
assets = filter(None, [get_default_asset(x.resource) for x in resources])
Expand Down
2 changes: 1 addition & 1 deletion geonode/upload/handlers/shapefile/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def extract_params_from_data(_data, action=None):
"""
if action == exa.COPY.value:
title = json.loads(_data.get("defaults"))
return {"title": title.pop("title")}, _data
return {"title": title.pop("title"), "store_spatial_file": True}, _data

additional_params = {
"skip_existing_layers": _data.pop("skip_existing_layers", "False"),
Expand Down
2 changes: 1 addition & 1 deletion geonode/upload/handlers/tiles3d/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def extract_params_from_data(_data, action=None):
"""
if action == exa.COPY.value:
title = json.loads(_data.get("defaults"))
return {"title": title.pop("title")}, _data
return {"title": title.pop("title"), "store_spatial_file": True}, _data

return {
"skip_existing_layers": _data.pop("skip_existing_layers", "False"),
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ geonode-pinax-notifications==6.0.0.2

# GeoNode org maintained apps.
# django-geonode-mapstore-client==4.0.5
git+https://github.com/GeoNode/geonode-mapstore-client.git@master#egg=django_geonode_mapstore_client
git+https://github.com/GeoNode/geonode-mapstore-client.git@ISSUE_12657#egg=django_geonode_mapstore_client
django-avatar==8.0.0
geonode-oauth-toolkit==2.2.2.2
geonode-user-messages==2.0.2.2
Expand Down

0 comments on commit e2d8ca7

Please sign in to comment.