Improvements on polls support
This commit is contained in:
parent
d67a44bb59
commit
31807233c4
4 changed files with 77 additions and 41 deletions
13
app/admin.py
13
app/admin.py
|
@ -281,7 +281,7 @@ async def admin_inbox(
|
|||
) -> templates.TemplateResponse:
|
||||
where = [
|
||||
models.InboxObject.ap_type.not_in(
|
||||
["Accept", "Delete", "Create", "Update", "Undo", "Read"]
|
||||
["Accept", "Delete", "Create", "Update", "Undo", "Read", "Add", "Remove"]
|
||||
),
|
||||
models.InboxObject.is_deleted.is_(False),
|
||||
]
|
||||
|
@ -695,12 +695,11 @@ async def admin_actions_vote(
|
|||
form_data = await request.form()
|
||||
names = form_data.getlist("name")
|
||||
logger.info(f"{names=}")
|
||||
for name in names:
|
||||
await boxes.send_vote(
|
||||
db_session,
|
||||
in_reply_to=in_reply_to,
|
||||
name=name,
|
||||
)
|
||||
await boxes.send_vote(
|
||||
db_session,
|
||||
in_reply_to=in_reply_to,
|
||||
names=names,
|
||||
)
|
||||
return RedirectResponse(redirect_url, status_code=302)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue