[cleanup] Minor pep8 cleanup

This commit is contained in:
Ferdinand Thiessen 2021-11-25 15:44:37 +01:00
parent aa64c769ef
commit e626239d84
2 changed files with 21 additions and 3 deletions

View File

@ -336,7 +336,16 @@ def respond_invitation(invite: Invitation, accepted=True):
raise Conflict raise Conflict
if not accepted: if not accepted:
EventPlugin.plugin.notify(inviter, _("Invitation rejected"), {"type": NotifyType.INVITATION_REJECTED, "event": job.event_id_, "job": invite.job_id, "invitee": invite.invitee_id}) EventPlugin.plugin.notify(
inviter,
_("Invitation rejected"),
{
"type": NotifyType.INVITATION_REJECTED,
"event": job.event_id_,
"job": invite.job_id,
"invitee": invite.invitee_id,
},
)
else: else:
if invite.transferee_id is None: if invite.transferee_id is None:
assign_job(job, invite.invitee_, 1) assign_job(job, invite.invitee_, 1)
@ -346,7 +355,16 @@ def respond_invitation(invite: Invitation, accepted=True):
raise Conflict raise Conflict
unassign_job(job, invite.transferee_, service[0], True) unassign_job(job, invite.transferee_, service[0], True)
assign_job(job, invite.invitee_, service[0].value) assign_job(job, invite.invitee_, service[0].value)
EventPlugin.plugin.notify(inviter, _("Invitation accepted"), {"type": NotifyType.INVITATION_ACCEPTED, "event": job.event_id_, "job": invite.job_id, "invitee": invite.invitee_id}) EventPlugin.plugin.notify(
inviter,
_("Invitation accepted"),
{
"type": NotifyType.INVITATION_ACCEPTED,
"event": job.event_id_,
"job": invite.job_id,
"invitee": invite.invitee_id,
},
)
@scheduled @scheduled