Browse Source

Compare objects rather than attrs

Alec Nikolas Reiter 7 years ago
parent
commit
9db5cc9b51
1 changed files with 1 additions and 1 deletions
  1. 1 1
      flaskbb/forum/models.py

+ 1 - 1
flaskbb/forum/models.py

@@ -496,7 +496,7 @@ class Topic(db.Model, CRUDMixin):
         """
 
         # if the target forum is the current forum, abort
-        if self.forum_id == new_forum.id:
+        if self.forum == new_forum:
             return False
 
         old_forum = self.forum