From 8d9504fc2432544d97a4c75aaf6ff1b1c6d95d9c Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Fri, 12 Jan 2024 15:53:46 +0100 Subject: [PATCH] fix new geostore 1.0.0 choices --- project/geosource/models.py | 2 +- project/geosource/serializers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project/geosource/models.py b/project/geosource/models.py index ceddd68f..4ce40753 100644 --- a/project/geosource/models.py +++ b/project/geosource/models.py @@ -110,7 +110,7 @@ class Status(models.IntegerChoices): id_field = models.CharField(max_length=255, default="id") geom_type = models.IntegerField( - choices=GeometryTypes.choices(), null=True, blank=True + choices=GeometryTypes.choices, null=True, blank=True ) settings = models.JSONField(default=dict, blank=True) diff --git a/project/geosource/serializers.py b/project/geosource/serializers.py index c9b2c060..4ff52928 100644 --- a/project/geosource/serializers.py +++ b/project/geosource/serializers.py @@ -365,7 +365,7 @@ class CSVSourceSerializer(FileSourceSerializer): coordinates_field_count = serializers.CharField(required=False) coordinates_separator = serializers.CharField(required=False) geom_type = serializers.ChoiceField( - default=GeometryTypes.Point, choices=GeometryTypes.choices() + default=GeometryTypes.Point, choices=GeometryTypes.choices ) class Meta: