From 6aeadf63a9bc08ed96051e95a921be107fcafecf Mon Sep 17 00:00:00 2001 From: Ivan Kropotkin Date: Sun, 12 May 2024 04:07:31 +0200 Subject: [PATCH] :ambulance: sync: return None when dynamic field not yet created On reading property it's not a error if field is not created, it just mean that the property was never set before. --- sync/models/base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sync/models/base.py b/sync/models/base.py index a895638f..788ebc37 100644 --- a/sync/models/base.py +++ b/sync/models/base.py @@ -161,9 +161,7 @@ def _get_sync_property(self, property_name, property_type): ) if not field: - raise exceptions.UserError( - f"Field '{field_name}' not found for the current model '{self._name}'." - ) + return None res_id = f"{self._name},{self.id}" prop = Property.search(