aboutsummaryrefslogtreecommitdiff
path: root/app/views/packages
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-07-04 00:14:37 +0100
committerrubenwardy <rw@rubenwardy.com>2018-07-04 00:38:51 +0100
commit19e1ed8b32179e3317c807b3ab0581e3b5fb00a2 (patch)
tree3e3409482aa7a0f8c8da8721df26350f64a00f6a /app/views/packages
parenteb6b1d6375841cd7b87b4f6a08b34ed5239a6354 (diff)
downloadcheatdb-19e1ed8b32179e3317c807b3ab0581e3b5fb00a2.tar.xz
Implement forum parser to increase accuracy
Diffstat (limited to 'app/views/packages')
-rw-r--r--app/views/packages/__init__.py8
-rw-r--r--app/views/packages/todo.py12
2 files changed, 10 insertions, 10 deletions
diff --git a/app/views/packages/__init__.py b/app/views/packages/__init__.py
index 6ef76ec..4d357a6 100644
--- a/app/views/packages/__init__.py
+++ b/app/views/packages/__init__.py
@@ -100,11 +100,11 @@ def package_page(package):
package.checkPerm(current_user, Permission.APPROVE_NEW)
similar_topics = None if not show_similar_topics else \
- KrockForumTopic.query \
+ ForumTopic.query \
.filter_by(name=package.name) \
- .filter(KrockForumTopic.topic_id != package.forums) \
- .filter(~ db.exists().where(Package.forums==KrockForumTopic.topic_id)) \
- .order_by(db.asc(KrockForumTopic.name), db.asc(KrockForumTopic.title)) \
+ .filter(ForumTopic.topic_id != package.forums) \
+ .filter(~ db.exists().where(Package.forums==ForumTopic.topic_id)) \
+ .order_by(db.asc(ForumTopic.name), db.asc(ForumTopic.title)) \
.all()
releases = getReleases(package)
diff --git a/app/views/packages/todo.py b/app/views/packages/todo.py
index 81735eb..84cfef4 100644
--- a/app/views/packages/todo.py
+++ b/app/views/packages/todo.py
@@ -41,8 +41,8 @@ def todo_page():
screenshots = PackageScreenshot.query.filter_by(approved=False).all()
- topics_to_add = KrockForumTopic.query \
- .filter(~ db.exists().where(Package.forums==KrockForumTopic.topic_id)) \
+ topics_to_add = ForumTopic.query \
+ .filter(~ db.exists().where(Package.forums==ForumTopic.topic_id)) \
.count()
return render_template("todo/list.html", title="Reports and Work Queue",
@@ -54,11 +54,11 @@ def todo_page():
@app.route("/todo/topics/")
@login_required
def todo_topics_page():
- total = KrockForumTopic.query.count()
+ total = ForumTopic.query.count()
- topics = KrockForumTopic.query \
- .filter(~ db.exists().where(Package.forums==KrockForumTopic.topic_id)) \
- .order_by(db.asc(KrockForumTopic.name), db.asc(KrockForumTopic.title)) \
+ topics = ForumTopic.query \
+ .filter(~ db.exists().where(Package.forums==ForumTopic.topic_id)) \
+ .order_by(db.asc(ForumTopic.name), db.asc(ForumTopic.title)) \
.all()
return render_template("todo/topics.html", topics=topics, total=total)