Browse Source

Don't commit in superclass when hiding/unhiding

Could lead to inconsistent data if the commit succeeds but then the next step fails
Alec Nikolas Reiter 7 years ago
parent
commit
fd03eb8579
1 changed files with 0 additions and 2 deletions
  1. 0 2
      flaskbb/utils/database.py

+ 0 - 2
flaskbb/utils/database.py

@@ -113,13 +113,11 @@ class HideableMixin(object):
 
         self.hidden = True
         self.hidden_at = time_utcnow()
-        db.session.commit()
         return self
 
     def unhide(self, *args, **kwargs):
         self.hidden = False
         self.hidden_at = None
-        db.session.commit()
         return self