Skip to content

Commit 8d58004

Browse files
[Fixes #12674] store spatial file is always false during cloning (#12675)
* [Fixes #12674] store spatial file is always false during cloning * [Fixes #12674] store spatial file is always false during cloning * [Fixes #12674] store spatial file is always false during cloning * Update requirements.txt
1 parent fbd853d commit 8d58004

File tree

7 files changed

+7
-10
lines changed

7 files changed

+7
-10
lines changed

.env_dev

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,6 @@ DEBUG=True
166166

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

169-
# STATIC_ROOT=/mnt/volumes/statics/static/
170-
# MEDIA_ROOT=/mnt/volumes/statics/uploaded/
171-
# GEOIP_PATH=/mnt/volumes/statics/geoip.db
172169

173170
CACHE_BUSTING_STATIC_ENABLED=False
174171

geonode/upload/handlers/common/raster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def extract_params_from_data(_data, action=None):
125125
"""
126126
if action == exa.COPY.value:
127127
title = json.loads(_data.get("defaults"))
128-
return {"title": title.pop("title")}, _data
128+
return {"title": title.pop("title"), "store_spatial_file": True}, _data
129129

130130
return {
131131
"skip_existing_layers": _data.pop("skip_existing_layers", "False"),

geonode/upload/handlers/common/remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def extract_params_from_data(_data, action=None):
102102
"""
103103
if action == exa.COPY.value:
104104
title = json.loads(_data.get("defaults"))
105-
return {"title": title.pop("title")}, _data
105+
return {"title": title.pop("title"), "store_spatial_file": True}, _data
106106

107107
return {
108108
"source": _data.pop("source", "upload"),

geonode/upload/handlers/common/vector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def extract_params_from_data(_data, action=None):
135135
"""
136136
if action == exa.COPY.value:
137137
title = json.loads(_data.get("defaults"))
138-
return {"title": title.pop("title")}, _data
138+
return {"title": title.pop("title"), "store_spatial_file": True}, _data
139139

140140
return {
141141
"skip_existing_layers": _data.pop("skip_existing_layers", "False"),
@@ -258,7 +258,7 @@ def perform_last_step(execution_id):
258258
that the execution is completed
259259
"""
260260
_exec = BaseHandler.perform_last_step(execution_id=execution_id)
261-
if _exec and not _exec.input_params.get("store_spatial_file", False):
261+
if _exec and not _exec.input_params.get("store_spatial_file", True):
262262
resources = ResourceHandlerInfo.objects.filter(execution_request=_exec)
263263
# getting all assets list
264264
assets = filter(None, [get_default_asset(x.resource) for x in resources])

geonode/upload/handlers/shapefile/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def extract_params_from_data(_data, action=None):
103103
"""
104104
if action == exa.COPY.value:
105105
title = json.loads(_data.get("defaults"))
106-
return {"title": title.pop("title")}, _data
106+
return {"title": title.pop("title"), "store_spatial_file": True}, _data
107107

108108
additional_params = {
109109
"skip_existing_layers": _data.pop("skip_existing_layers", "False"),

geonode/upload/handlers/tiles3d/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def extract_params_from_data(_data, action=None):
146146
"""
147147
if action == exa.COPY.value:
148148
title = json.loads(_data.get("defaults"))
149-
return {"title": title.pop("title")}, _data
149+
return {"title": title.pop("title"), "store_spatial_file": True}, _data
150150

151151
return {
152152
"skip_existing_layers": _data.pop("skip_existing_layers", "False"),

geonode/upload/handlers/tiles3d/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_extract_params_from_data(self):
9999
action="copy",
100100
)
101101

102-
self.assertEqual(actual, {"title": "title_of_the_cloned_resource"})
102+
self.assertEqual(actual, {"store_spatial_file": True, "title": "title_of_the_cloned_resource"})
103103

104104
def test_is_valid_should_raise_exception_if_the_3dtiles_is_invalid(self):
105105
data = {"base_file": "/using/double/dot/in/the/name/is/an/error/file.invalid.json"}

0 commit comments

Comments
 (0)