diff --git a/helpers/models.py b/helpers/models.py index 6ab4a28..a5b083b 100644 --- a/helpers/models.py +++ b/helpers/models.py @@ -32,6 +32,6 @@ USchema = marshmallow_dataclass.class_schema(User) class UserSchema(USchema): def load(self, entity, *args, **kwargs): - if entity.get('next_daily_notify_time', None): + if entity.get('next_daily_notify_time', None) is not None: entity['next_daily_notify_time'] = entity['next_daily_notify_time'].strftime("%Y-%m-%dT%H:%M:00.000+00:00") return super().load(entity, *args, **kwargs)