improved property system to differentiate between unknown and zero

This commit is contained in:
vabene1111
2024-02-18 11:26:16 +01:00
parent 717d4d2346
commit 28479e96e9
10 changed files with 110 additions and 19 deletions

View File

@ -563,7 +563,7 @@ class PropertyTypeSerializer(OpenDataModelMixin, WritableNestedModelSerializer,
class PropertySerializer(UniqueFieldsMixin, WritableNestedModelSerializer):
property_type = PropertyTypeSerializer()
property_amount = CustomDecimalField()
property_amount = CustomDecimalField(allow_null=True)
def create(self, validated_data):
validated_data['space'] = self.context['request'].space