[cleanup] Minor pep8 cleanup
This commit is contained in:
parent
aa64c769ef
commit
e626239d84
|
@ -114,7 +114,7 @@ class AuthLDAP(AuthPlugin):
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if user.display_name:
|
if user.display_name:
|
||||||
attributes.update( {"displayName": user.display_name})
|
attributes.update({"displayName": user.display_name})
|
||||||
ldap_conn.add(dn, self.object_classes, attributes)
|
ldap_conn.add(dn, self.object_classes, attributes)
|
||||||
self._set_roles(user)
|
self._set_roles(user)
|
||||||
self.update_user(user)
|
self.update_user(user)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue