Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion funnel/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from __future__ import annotations

from flask.signals import Namespace
from blinker import Namespace

model_signals = Namespace()
app_signals = Namespace()
Expand Down
1 change: 1 addition & 0 deletions funnel/views/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def update_project_commentset_membership(
def update_proposal_commentset_membership(
proposal: Proposal, actor: Account, user: Account
) -> None:
db.session.flush()
if 'submitter' in proposal.roles_for(user):
proposal.commentset.add_subscriber(actor=actor, member=user)
else:
Expand Down
13 changes: 13 additions & 0 deletions funnel/views/proposal.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
sa,
sa_orm,
)
from ..signals import proposal_role_change
from ..typing import ReturnRenderWith, ReturnView
from .helpers import html_in_json, render_redirect
from .login_session import requires_login, requires_sudo, requires_user_not_spammy
Expand Down Expand Up @@ -101,6 +102,9 @@ def new_proposal(self) -> ReturnRenderWith:
form.populate_obj(proposal)
proposal.name = make_name(proposal.title)
proposal.update_description()
proposal_role_change.send(
proposal, actor=current_auth.user, user=current_auth.user
)
db.session.commit()
dispatch_notification(
ProposalSubmittedNotification(document=proposal),
Expand Down Expand Up @@ -256,6 +260,9 @@ def add_collaborator(self) -> ReturnView:
)
collaborator_form.populate_obj(membership)
db.session.add(membership)
proposal_role_change.send(
self.obj, actor=current_auth.user, user=membership.member
)
db.session.commit()
return {
'status': 'ok',
Expand Down Expand Up @@ -483,6 +490,9 @@ def edit(self) -> ReturnView:
membership.amend_by(current_auth.user) as amendment,
):
collaborator_form.populate_obj(amendment)
proposal_role_change.send(
self.obj.proposal, actor=current_auth.user, user=amendment.member
)
db.session.commit()
return {
'status': 'ok',
Expand Down Expand Up @@ -523,6 +533,9 @@ def remove(self) -> ReturnView:
),
}, 422
membership.revoke(actor=current_auth.user)
proposal_role_change.send(
self.obj.proposal, actor=current_auth.user, user=self.obj.member
)
db.session.commit()
return {
'status': 'ok',
Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Babel
base58
bcrypt
better_profanity!=0.7.0 # https://github.com/snguyenthanh/better_profanity/issues/19
blinker
Brotli
cachelib
chevron
Expand Down
15 changes: 8 additions & 7 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SHA1:abf285de7da60fc89db4c49e75bbecabb0233e54
# SHA1:939cfa6914920f1418293934585be7dc5d79e802
#
# This file was generated by pip-compile-multi.
# To update, run:
Expand All @@ -23,7 +23,7 @@ aiohttp-retry==2.9.1
# via twilio
aiosignal==1.3.2
# via aiohttp
alembic==1.16.1
alembic==1.16.2
# via
# -r requirements/base.in
# flask-migrate
Expand Down Expand Up @@ -61,6 +61,7 @@ bleach==6.2.0
# coaster
blinker==1.9.0
# via
# -r requirements/base.in
# baseframe
# coaster
# flask
Expand All @@ -70,7 +71,7 @@ cachelib==0.13.0
# via
# -r requirements/base.in
# flask-caching
cachetools==6.0.0
cachetools==6.1.0
# via premailer
certifi==2025.6.15
# via
Expand Down Expand Up @@ -238,7 +239,7 @@ lxml==5.4.0
# via premailer
mako==1.3.10
# via alembic
markdown==3.8
markdown==3.8.2
# via
# coaster
# flask-flatpages
Expand Down Expand Up @@ -267,7 +268,7 @@ mdurl==0.1.2
# via markdown-it-py
more-itertools==10.7.0
# via cssutils
multidict==6.4.4
multidict==6.5.0
# via
# aiohttp
# yarl
Expand All @@ -279,7 +280,7 @@ mypy-extensions==1.1.0
# via typing-inspect
oauth2client==4.1.3
# via -r requirements/base.in
oauthlib==3.2.2
oauthlib==3.3.1
# via
# requests-oauthlib
# tweepy
Expand Down Expand Up @@ -477,7 +478,7 @@ uc-micro-py==1.0.3
# via linkify-it-py
unidecode==1.4.0
# via coaster
urllib3[socks]==2.4.0
urllib3[socks]==2.5.0
# via
# -r requirements/base.in
# requests
Expand Down
6 changes: 3 additions & 3 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mccabe==0.7.0
# via pylint
mkinit==1.1.0
# via -r requirements/dev.in
mypy==1.16.0
mypy==1.16.1
# via -r requirements/dev.in
mypy-json-report==1.3.0
# via -r requirements/dev.in
Expand All @@ -48,7 +48,7 @@ parso==0.8.4
# via jedi
pathspec==0.12.1
# via mypy
pip-compile-multi==3.1.0
pip-compile-multi==3.2.1
# via -r requirements/dev.in
pip-tools==7.4.1
# via pip-compile-multi
Expand Down Expand Up @@ -76,7 +76,7 @@ pytest-icdiff==0.9
# via -r requirements/dev.in
pyupgrade==3.20.0
# via -r requirements/dev.in
ruff==0.11.13
ruff==0.12.0
# via -r requirements/dev.in
tokenize-rt==6.2.0
# via pyupgrade
Expand Down
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pluggy==1.6.0
# via
# pytest
# pytest-cov
pytest==8.4.0
pytest==8.4.1
# via
# -r requirements/test.in
# pytest-asyncio
Expand Down Expand Up @@ -84,5 +84,5 @@ text-unidecode==1.3
# via python-slugify
tomlkit==0.13.3
# via -r requirements/test.in
typeguard==4.4.3
typeguard==4.4.4
# via -r requirements/test.in
Loading