style: fix code style
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is failing Details

This commit is contained in:
Luca 2024-02-13 15:38:04 +01:00
parent b99264647d
commit 1a3382614a
2 changed files with 14 additions and 10 deletions

View File

@ -12,9 +12,11 @@ def pretalx_musicrate_placeholders(sender, **kwargs):
SimpleFunctionalMailTextPlaceholder(
"assignee",
["submission"],
lambda submission: assignee.user.name
if (assignee := submission.assignee) is not None
else "Günther",
lambda submission: (
assignee.user.name
if (assignee := submission.assignee) is not None
else "Günther"
),
"Günther",
_("The name of the submission's assignee"),
)

View File

@ -323,13 +323,15 @@ class PresenterView(EventPermissionRequired, SubmissionMixin, TemplateView):
links.append(
(
"youtube",
url.removeprefix("http")
.removeprefix("s")
.removeprefix("://")
.removeprefix("youtu.be/")[:11]
if m[1] == "youtu.be/"
else "".join(
parse_qs(urlparse(url).query).get("v", "dQw4w9WgXcQ")
(
url.removeprefix("http")
.removeprefix("s")
.removeprefix("://")
.removeprefix("youtu.be/")[:11]
if m[1] == "youtu.be/"
else "".join(
parse_qs(urlparse(url).query).get("v", "dQw4w9WgXcQ")
)
),
)
)