Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5a77a22
blank dataset handler
mattiagiupponi Oct 6, 2025
5d570ca
[Fixes #13507] Create dataset page moved to the importer
mattiagiupponi Oct 7, 2025
f1a8284
Fixes #13507: add additional kwarg for publisher
mattiagiupponi Oct 8, 2025
bae4bbd
Fixes #13507: add handler for empty dataset
mattiagiupponi Oct 8, 2025
80fdf32
Fixes #13507: add handler for empty dataset
mattiagiupponi Oct 8, 2025
957e251
Fixes #13507: add handler for empty dataset
mattiagiupponi Oct 8, 2025
6e4d3a8
Fixes #13507: minor typos fix and remove legacy code
mattiagiupponi Oct 8, 2025
3ce8770
Fixes #13507: minor typos fix and remove legacy code
mattiagiupponi Oct 8, 2025
45af87d
[Fixes #13507] merge with master
mattiagiupponi Oct 10, 2025
9f8a118
[Fixes #13507] Add test coverage for empty dataset
mattiagiupponi Oct 10, 2025
fb34d33
[Fixes #13507] Add test coverage for empty dataset
mattiagiupponi Oct 10, 2025
27132d5
[Fixes #13507] Add test coverage for empty dataset
mattiagiupponi Oct 10, 2025
e97b1bb
[Fixes #13507] Add test coverage for empty dataset
mattiagiupponi Oct 10, 2025
7b0cbe0
[Fixes #13507] Add test coverage for empty dataset
mattiagiupponi Oct 10, 2025
68ee9fa
[Fixes #13507] fix empty dataset when attributes are not defined
mattiagiupponi Oct 13, 2025
3b2b02e
Add base image with gdal upgrade
mattiagiupponi Oct 13, 2025
5970ead
Merge branch 'master' of github.com:GeoNode/geonode into ISSUE_13507
mattiagiupponi Oct 15, 2025
a1f55e3
[Fixes #13507] thumbnail as optiona and fix attribute for attributes …
mattiagiupponi Oct 15, 2025
e5f56f8
[Fixes #13507] thumbnail as optiona and fix attribute for attributes …
mattiagiupponi Oct 15, 2025
2194988
[Fixes #13507] remove unwanted changes
mattiagiupponi Oct 15, 2025
064b2ff
Merge branch 'master' of github.com:GeoNode/geonode into ISSUE_13507
mattiagiupponi Oct 17, 2025
4e7ffd8
[Fixes #13507] Create dataset page moved to the importer
mattiagiupponi Oct 17, 2025
5b3ec06
[Fixes #13507] Create dataset page moved to the importer
mattiagiupponi Oct 17, 2025
273bfff
[Fixes #13507] Create dataset page moved to the importer
mattiagiupponi Oct 17, 2025
f7ff382
[Fixes #13507] Create dataset page moved to the importer
mattiagiupponi Oct 20, 2025
21dccd5
Merge branch 'master' of github.com:GeoNode/geonode into ISSUE_13507
mattiagiupponi Oct 21, 2025
8841ea1
[Fixes #13507] align test docker to latest ubuntu version
mattiagiupponi Oct 21, 2025
d970261
[Fixes #13507] test fix test
mattiagiupponi Oct 21, 2025
566193b
merge with master
mattiagiupponi Oct 28, 2025
dc85f5a
merge with master
mattiagiupponi Oct 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions geonode/geoserver/createlayer/forms.py

This file was deleted.

5 changes: 0 additions & 5 deletions geonode/geoserver/createlayer/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,3 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#########################################################################

from django.urls import re_path
from . import views

urlpatterns = [re_path(r"$", views.dataset_create, name="dataset_create")]
63 changes: 0 additions & 63 deletions geonode/geoserver/createlayer/views.py

This file was deleted.

2 changes: 1 addition & 1 deletion geonode/upload/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def create(self, request, *args, **kwargs):
}

# clone the memory files into local file system
if "url" not in _data:
if "url" not in _data and not _data.get("is_empty", False):
storage_manager = StorageManager(
remote_files={k: v for k, v in _data.items() if k.endswith("_file")},
concrete_storage_manager=FileSystemStorageManager(),
Expand Down
25 changes: 21 additions & 4 deletions geonode/upload/celery_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from typing import Optional

from celery import Task
from django.db import connections
from django.utils import timezone
from django.utils.module_loading import import_string
from django.utils.translation import gettext_lazy
Expand Down Expand Up @@ -54,6 +55,7 @@
IMPORTER_RESOURCE_CREATION_RATE_LIMIT,
)
from geonode.upload.utils import (
DEFAULT_PK_COLUMN_NAME,
call_rollback_function,
call_on_failure,
error_handler,
Expand Down Expand Up @@ -399,7 +401,7 @@ def publish_resource(
_overwrite = _exec.input_params.get("overwrite_existing_layer")

_publisher = DataPublisher(handler_module_path)

kwargs.update({"exec_id": execution_id})
# extracting the crs and the resource name, are needed for publish the resource
data = _publisher.extract_resource_to_publish(_files, action, layer_name, alternate, **kwargs)
if data:
Expand Down Expand Up @@ -747,10 +749,25 @@ def _create_field(dynamic_model_schema, field, _kwargs):
row_to_insert.append(_create_field(dynamic_model_schema, field, _kwargs))

if row_to_insert:
# the build creation improves the overall permformance with the DB
FieldSchema.objects.bulk_create(row_to_insert, 30)
if dynamic_model_schema.managed:
# If the dynamic mode schema is managed we have to save each single field
# one by one. Doing this will allow Django to create column in the database
for field in row_to_insert:
if field.name == DEFAULT_PK_COLUMN_NAME:
# django automatically created a column name ID and use it as primary key by default
# if we try to create the column FID as needed, it will raise error.
# in this way we will just update the name from ID to FID
with connections[os.getenv("DEFAULT_BACKEND_DATASTORE", "datastore")].cursor() as cursor:
cursor.execute(
f"ALTER TABLE {dynamic_model_schema.name} RENAME COLUMN id TO {DEFAULT_PK_COLUMN_NAME};"
)
else:
field.save()
else:
# the build creation improves the overall permformance with the DB
FieldSchema.objects.bulk_create(row_to_insert, 30)
# fixing the schema model in django

del row_to_insert
return "dynamic_model", layer_name, execution_id


Expand Down
4 changes: 1 addition & 3 deletions geonode/upload/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ def input_is_valid(self):
"""
Perform basic validation steps
"""
if self.files:
return self.handler.is_valid(self.files, self.user, execution_id=self.execution_id)
url = orchestrator.get_execution_object(exec_id=self.execution_id).input_params.get("url")
if url:
return self.handler.is_valid_url(url)
return False
return self.handler.is_valid(self.files, self.user, execution_id=self.execution_id)

def _import_and_register(self, execution_id, task_name, **kwargs):
"""
Expand Down
2 changes: 1 addition & 1 deletion geonode/upload/handlers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class BaseVectorFileHandler(BaseHandler):
return

@staticmethod
def create_ogr2ogr_command(files, original_name, ovverwrite_layer, alternate):
def create_ogr2ogr_command(files, original_name, ovverwrite_layer, alternate, **kwargs):
"""
Define the ogr2ogr command to be executed.
This is a default command that is needed to import a vector file. For Raster file
Expand Down
Loading
Loading