Vorbereitung erstes Release
This commit is contained in:
1 parent
481ccca5da
commit
dfad658237
3 files changed
+6
-6
No files matched your search
@@ -164,9 +164,9 @@ def names_for_form(db: Session, form: Form) -> dict[int, dict[str, SlotNames]]:
|
||||
else f"{parts['first']} {parts['last']}".strip()
|
||||
)
|
||||
user_ids = {r.user_id for r in rows if r.user_id is not None and r.response_id not in given}
|
||||
accounts = dict(db.execute(
|
||||
accounts = {uid: name for uid, name in db.execute(
|
||||
select(UserAccount.id, UserAccount.display_name).where(UserAccount.id.in_(user_ids))
|
||||
).tuples().all()) if user_ids else {}
|
||||
)} if user_ids else {}
|
||||
guest = gettext("Guest")
|
||||
result: dict[int, dict[str, SlotNames]] = {}
|
||||
for row in rows:
|
||||
|
||||
@@ -133,9 +133,9 @@ def participant_names(db: Session, rows: Sequence[Response]) -> dict[int, str]:
|
||||
user_ids = {r.user_id for r in rows if r.user_id is not None}
|
||||
if not user_ids:
|
||||
return {}
|
||||
names = dict(db.execute(
|
||||
names = {uid: name for uid, name in db.execute(
|
||||
select(UserAccount.id, UserAccount.display_name).where(UserAccount.id.in_(user_ids))
|
||||
).tuples().all())
|
||||
)}
|
||||
return {r.id: names[r.user_id] for r in rows if r.user_id in names}
|
||||
|
||||
|
||||
|
||||
@@ -464,12 +464,12 @@ def audit_log(
|
||||
found = db.execute(
|
||||
select(UserAccount.id, UserAccount.display_name).where(UserAccount.id.in_(user_ids))
|
||||
)
|
||||
targets.update({f"user:{i}": name for i, name in found.tuples()})
|
||||
targets.update({f"user:{i}": name for i, name in found})
|
||||
if group_ids:
|
||||
found_groups = db.execute(
|
||||
select(UserGroup.id, UserGroup.name).where(UserGroup.id.in_(group_ids))
|
||||
)
|
||||
targets.update({f"group:{i}": name for i, name in found_groups.tuples()})
|
||||
targets.update({f"group:{i}": name for i, name in found_groups})
|
||||
return render(
|
||||
request,
|
||||
"admin_audit.html",
|
||||
|
||||
Reference in new issue
Block a user