From 39ece68ed0df82a46402731cfaaf7e319a4311b3 Mon Sep 17 00:00:00 2001 From: MaxWolodin <39838893+MaxWolodin@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:39:26 +0100 Subject: [PATCH] Updated UUIDProperty to serialize as None if value is None If the UUIDProperty was previously set to None the value would have been serialized as 'None' instead of None. This leads to a 400 Bad Request if the controller is expecting a UUID. --- odata/property.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/odata/property.py b/odata/property.py index 6e002d1..a7c8db4 100644 --- a/odata/property.py +++ b/odata/property.py @@ -311,6 +311,8 @@ class UUIDProperty(StringProperty): filters do not use quotes for UUID """ def serialize(self, value): + if value is None: + return None return str(value) def deserialize(self, value):