fixed and improvements to property editor

This commit is contained in:
vabene1111
2023-12-02 20:14:12 +01:00
parent 0c381ed46c
commit f3e11e6358
5 changed files with 308 additions and 57 deletions

View File

@@ -19,6 +19,7 @@ from oauth2_provider.models import AccessToken
from PIL import Image
from rest_framework import serializers
from rest_framework.exceptions import NotFound, ValidationError
from rest_framework.fields import IntegerField
from cookbook.helper.CustomStorageClass import CachedS3Boto3Storage
from cookbook.helper.HelperFunctions import str2bool
@@ -524,6 +525,7 @@ class SupermarketSerializer(UniqueFieldsMixin, SpacedModelSerializer, OpenDataMo
class PropertyTypeSerializer(OpenDataModelMixin, WritableNestedModelSerializer, UniqueFieldsMixin):
id = serializers.IntegerField(required=False)
order = IntegerField(default=0, required=False)
def create(self, validated_data):
validated_data['name'] = validated_data['name'].strip()