Skip to content

Instantly share code, notes, and snippets.

@shreyas-satish
Last active August 29, 2015 14:20
Show Gist options
  • Save shreyas-satish/7e57994057005124e1f3 to your computer and use it in GitHub Desktop.
Save shreyas-satish/7e57994057005124e1f3 to your computer and use it in GitHub Desktop.
# works when executed in ipython but the transaction freezes when executed through flask
ids = [1,2]
cls = User
approved = True
db.session.query(cls).filter(cls.id.in_(ids)).update({'approved': approved}, False)
db.session.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment