Don't change ldap group membership if it's not configured
This commit is contained in:
parent
ced94ae019
commit
8d82b7e85b
|
@ -217,6 +217,7 @@ class TrainingViewSet(Base, Retrieve, Create, Update):
|
|||
elif session.course.id == 247:
|
||||
member.rabbit_cert_date = utils.today_alberta_tz() if status == 'Attended' else None
|
||||
|
||||
if utils_ldap.is_configured():
|
||||
if status == 'Attended':
|
||||
utils_ldap.add_to_group(member, 'Laser Users')
|
||||
else:
|
||||
|
@ -224,6 +225,7 @@ class TrainingViewSet(Base, Retrieve, Create, Update):
|
|||
elif session.course.id == 321:
|
||||
member.trotec_cert_date = utils.today_alberta_tz() if status == 'Attended' else None
|
||||
|
||||
if utils_ldap.is_configured():
|
||||
if status == 'Attended':
|
||||
utils_ldap.add_to_group(member, 'Trotec Users')
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user