From a6f4249afb7018c43e69a7e7c7e69e53bf04aa8d Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 2 Jun 2018 18:32:07 +0100 Subject: Increase link string length limit --- app/models.py | 2 +- app/tasks/forumtasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/models.py b/app/models.py index d85a888..5780aa0 100644 --- a/app/models.py +++ b/app/models.py @@ -688,7 +688,7 @@ class KrockForumTopic(db.Model): ttype = db.Column(db.Integer, nullable=False) title = db.Column(db.String(200), nullable=False) name = db.Column(db.String(30), nullable=True) - link = db.Column(db.String(50), nullable=True) + link = db.Column(db.String(200), nullable=True) def getType(self): if self.ttype == 1 or self.ttype == 2: diff --git a/app/tasks/forumtasks.py b/app/tasks/forumtasks.py index a0339b0..b2e0ca8 100644 --- a/app/tasks/forumtasks.py +++ b/app/tasks/forumtasks.py @@ -104,7 +104,7 @@ def importKrocksModList(): tags = re.findall("\[([a-z0-9_]+)\]", x["title"]) name = None for tag in reversed(tags): - if len(tag) < 50 and not tag in BANNED_NAMES and \ + if len(tag) < 30 and not tag in BANNED_NAMES and \ not re.match("^([a-z][0-9]+)$", tag): name = tag break -- cgit v1.2.3