diff --git a/bali/resources/model_resource.py b/bali/resources/model_resource.py index 18604fb..8f4e347 100644 --- a/bali/resources/model_resource.py +++ b/bali/resources/model_resource.py @@ -38,6 +38,8 @@ def update(self, schema_in: schema = None, pk=None): item = self.model.first(id=pk) # noinspection PyUnresolvedReferences for k, v in schema_in.dict().items(): + if v is None: + continue setattr(item, k, v) return item.save()