Browse Source

Automatically detect if the forum is a external link

sh4nks 10 years ago
parent
commit
19a2d6957a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      flaskbb/forum/models.py

+ 2 - 0
flaskbb/forum/models.py

@@ -612,6 +612,8 @@ class Forum(db.Model):
     @property
     @property
     def url(self):
     def url(self):
         """Returns the slugified url for the forum"""
         """Returns the slugified url for the forum"""
+        if self.external:
+            return self.external
         return url_for("forum.view_forum", forum_id=self.id, slug=self.slug)
         return url_for("forum.view_forum", forum_id=self.id, slug=self.slug)
 
 
     # Methods
     # Methods