From 2e149bfebe38cf3490ad23ec2aa0b9ec53c42d38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Wed, 25 Jul 2018 14:14:53 +0200 Subject: [PATCH] Disable SQLAlchemy session autoflush --- quotes-api/db.py | 2 +- twitch-cache-api/db.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quotes-api/db.py b/quotes-api/db.py index e2b1a10..3b23369 100644 --- a/quotes-api/db.py +++ b/quotes-api/db.py @@ -1,7 +1,7 @@ import flask_sqlalchemy -db = flask_sqlalchemy.SQLAlchemy() +db = flask_sqlalchemy.SQLAlchemy(session_options=dict(autoflush=False)) class Quote(db.Model): diff --git a/twitch-cache-api/db.py b/twitch-cache-api/db.py index 3bcaec3..fb642df 100644 --- a/twitch-cache-api/db.py +++ b/twitch-cache-api/db.py @@ -1,7 +1,7 @@ import flask_sqlalchemy -db = flask_sqlalchemy.SQLAlchemy() +db = flask_sqlalchemy.SQLAlchemy(session_options=dict(autoflush=False)) class Video(db.Model):