diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-07-11 00:53:03 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-07-11 00:53:03 +0100 |
commit | 5f7be4b4337358e35c9eda4b261260a08a958b4a (patch) | |
tree | 1a24fe62c3ba28d1867fb6a3fbbd475f8b6a2aba /app/blueprints/packages/reviews.py | |
parent | 9bf20df941deb666c0452cb425cf337d425dc59d (diff) | |
download | cheatdb-5f7be4b4337358e35c9eda4b261260a08a958b4a.tar.xz |
Add package and created_at to Notifications
Diffstat (limited to 'app/blueprints/packages/reviews.py')
-rw-r--r-- | app/blueprints/packages/reviews.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/blueprints/packages/reviews.py b/app/blueprints/packages/reviews.py index a662f77..ee6e3a5 100644 --- a/app/blueprints/packages/reviews.py +++ b/app/blueprints/packages/reviews.py @@ -97,11 +97,11 @@ def review(package): notif_msg = None if was_new: - notif_msg = "New review '{}' on package {}".format(form.title.data, package.title) + notif_msg = "New review '{}'".format(form.title.data) else: - notif_msg = "Updated review '{}' on package {}".format(form.title.data, package.title) + notif_msg = "Updated review '{}'".format(form.title.data) - addNotification(package.maintainers, current_user, notif_msg, url_for("threads.view", id=thread.id)) + addNotification(package.maintainers, current_user, notif_msg, url_for("threads.view", id=thread.id), package) db.session.commit() @@ -129,8 +129,8 @@ def delete_review(package): thread.review = None - notif_msg = "Deleted review '{}' on package {}, comments were kept as a thread".format(thread.title, package.title) - addNotification(package.maintainers, current_user, notif_msg, url_for("threads.view", id=thread.id)) + notif_msg = "Deleted review '{}', comments were kept as a thread".format(thread.title) + addNotification(package.maintainers, current_user, notif_msg, url_for("threads.view", id=thread.id), package) db.session.delete(review) db.session.commit() |