diff --git a/geonode/maps/api/views.py b/geonode/maps/api/views.py index 64385b314cc..abacaa69d4d 100644 --- a/geonode/maps/api/views.py +++ b/geonode/maps/api/views.py @@ -153,12 +153,13 @@ def perform_update(self, serializer): "dataset_names_before_changes": [lyr.alternate for lyr in instance.datasets], } + # incomming maplayer tabular check map_layers = serializer.validated_data.get("maplayers", []) - tabular_collection = all(("tabular" in layer.dataset.subtype) for layer in map_layers) - - instance = serializer.save( - subtype="tabular-collection" if tabular_collection else None, - ) + if len(map_layers) > 0: + tabular_collection = all(("tabular" in layer.dataset.subtype) for layer in map_layers) + instance = serializer.save( + subtype="tabular-collection" if tabular_collection else None, + ) # thumbnail, events and resouce routines self._post_change_routines( diff --git a/geonode/upload/migrations/0041_alter_uploadparallelismlimit_max_number_and_more.py b/geonode/upload/migrations/0041_alter_uploadparallelismlimit_max_number_and_more.py new file mode 100644 index 00000000000..4423cfa1017 --- /dev/null +++ b/geonode/upload/migrations/0041_alter_uploadparallelismlimit_max_number_and_more.py @@ -0,0 +1,27 @@ +# Generated by Django 4.2.9 on 2024-11-12 14:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("upload", "0040_alter_uploadparallelismlimit_max_number_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="uploadparallelismlimit", + name="max_number", + field=models.PositiveSmallIntegerField( + default=100, help_text="The maximum number of parallel uploads (0 to 32767)." + ), + ), + migrations.AlterField( + model_name="uploadsizelimit", + name="max_size", + field=models.PositiveBigIntegerField( + default=5368709120, help_text="The maximum file size allowed for upload (bytes)." + ), + ), + ]