diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-07-09 04:16:45 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-07-09 04:16:45 +0100 |
commit | d0aecd0ee59663ac81733ff8087847106c7ba4cc (patch) | |
tree | 6a306fc1d4d85fb074241d18c1245301e51046e1 /app/blueprints/packages/reviews.py | |
parent | 307b8f8ddea30cb44ad02170b40dd3c0d1d3d6c3 (diff) | |
download | cheatdb-d0aecd0ee59663ac81733ff8087847106c7ba4cc.tar.xz |
Rename triggerNotif to addNotification, add array support
Diffstat (limited to 'app/blueprints/packages/reviews.py')
-rw-r--r-- | app/blueprints/packages/reviews.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/blueprints/packages/reviews.py b/app/blueprints/packages/reviews.py index 4322e8d..114afae 100644 --- a/app/blueprints/packages/reviews.py +++ b/app/blueprints/packages/reviews.py @@ -22,7 +22,7 @@ from flask_wtf import FlaskForm from wtforms import * from wtforms.validators import * from app.models import db, PackageReview, Thread, ThreadReply -from app.utils import is_package_page, triggerNotif +from app.utils import is_package_page, addNotification class ReviewForm(FlaskForm): title = StringField("Title", [InputRequired(), Length(3,100)]) @@ -88,8 +88,7 @@ def review(package): else: notif_msg = "Updated review '{}' on package {}".format(form.title.data, package.title) - for maintainer in package.maintainers: - triggerNotif(maintainer, 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)) db.session.commit() |