Commit 70ad4e34 by Yvon Kerdoncuff

control USE_EXEMPTIONS_SHIFT_TEMPLATE before trying to read CagetteServices.get_exemptions_shift_id

parent 8f66a9fe
Pipeline #3908 failed with stage
in 0 seconds
...@@ -356,7 +356,10 @@ def manage_regular_shifts(request): ...@@ -356,7 +356,10 @@ def manage_regular_shifts(request):
template = loader.get_template('members/admin/manage_regular_shifts.html') template = loader.get_template('members/admin/manage_regular_shifts.html')
committees_shift_id = CagetteServices.get_committees_shift_id() committees_shift_id = CagetteServices.get_committees_shift_id()
committees_shift_name = getattr(settings, 'COMMITTEES_SHIFT_NAME', "service des Comités") committees_shift_name = getattr(settings, 'COMMITTEES_SHIFT_NAME', "service des Comités")
exemptions_shift_id = CagetteServices.get_exemptions_shift_id() if getattr(settings, 'USE_EXEMPTIONS_SHIFT_TEMPLATE', False) is True:
exemptions_shift_id = CagetteServices.get_exemptions_shift_id()
else:
exemptions_shift_id = 0
context = { context = {
'title': 'BDM - Créneaux', 'title': 'BDM - Créneaux',
'module': 'Membres', 'module': 'Membres',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment