We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9abd67f commit 1254da8Copy full SHA for 1254da8
examples/sqlalchemy/app.py
@@ -4,6 +4,7 @@
4
import orm
5
from connexion import FlaskApp, NoContent
6
7
+
8
def get_pets(limit, animal_type=None):
9
with db_session_factory() as db_session:
10
q = db_session.query(orm.Pet)
@@ -27,7 +28,7 @@ def put_pet(pet_id, pet):
27
28
p.update(**pet)
29
else:
30
logging.info("Creating pet %s..", pet_id)
- pet["created"] = datetime.now(timezone.UTC)
31
+ pet["created"] = datetime.now(timezone.utc)
32
db_session.add(orm.Pet(**pet))
33
db_session.commit()
34
return NoContent, (200 if p is not None else 201)
0 commit comments