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( SimpleFunctionalMailTextPlaceholder(
"assignee", "assignee",
["submission"], ["submission"],
lambda submission: assignee.user.name lambda submission: (
if (assignee := submission.assignee) is not None assignee.user.name
else "Günther", if (assignee := submission.assignee) is not None
else "Günther"
),
"Günther", "Günther",
_("The name of the submission's assignee"), _("The name of the submission's assignee"),
) )

View File

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