diff --git a/db.py b/db.py index 3e0bbfa..665db2e 100644 --- a/db.py +++ b/db.py @@ -177,7 +177,11 @@ class VkPost(db.Model): "selected_users": self.selected_users, "full_name": self.full_name, "post_id": self.post_id, - "publish_at": self.publish_at, + "publish_at": ( + self.publish_at.strftime("%Y-%m-%d %H:%M:%S") + if self.publish_at + else None + ), "created_at": self.created_at.strftime("%Y-%m-%d %H:%M:%S"), "updated_at": self.updated_at.strftime("%Y-%m-%d %H:%M:%S"), }