Browse Source

bugfix: set modified flag manually on session

As specified in Flask's doc, when touching a mutable object on the
session object, we need to set the modified flag manually.
Gu1 11 years ago
parent
commit
4e50737b42
1 changed files with 1 additions and 0 deletions
  1. 1 0
      ffdnispdb/views.py

+ 1 - 0
ffdnispdb/views.py

@@ -144,6 +144,7 @@ def edit_project(projectid):
             abort(403)
             abort(403)
 
 
         tokens = session.setdefault('edit_tokens', {})
         tokens = session.setdefault('edit_tokens', {})
+        session.modified = True # ITS A TARP
         tokens[r[0]] = r[1]
         tokens[r[0]] = r[1]
         # refresh page, without the token in the url
         # refresh page, without the token in the url
         return redirect(url_for('.edit_project', projectid=r[0]))
         return redirect(url_for('.edit_project', projectid=r[0]))