Skip to content

Commit

Permalink
fix: ensure FF is on before trying to get template_category_id value (
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewleith authored Jul 18, 2024
1 parent fc2758f commit 84a3c62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/main/views/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def add_service_template(service_id, template_type, template_folder_id=None):
subject,
None if form.process_type.data == TC_PRIORITY_VALUE else form.process_type.data,
template_folder_id,
form.template_category_id.data,
form.template_category_id.data if current_app.config["FF_TEMPLATE_CATEGORY"] else None,
)
except HTTPError as e:
if (
Expand Down Expand Up @@ -954,7 +954,7 @@ def edit_service_template(service_id, template_id): # noqa: C901 TODO: remove t
service_id,
subject,
None if form.process_type.data == TC_PRIORITY_VALUE else form.process_type.data,
form.template_category_id.data,
form.template_category_id.data if current_app.config["FF_TEMPLATE_CATEGORY"] else None,
)
flash(_("'{}' template saved").format(form.name.data), "default_with_tick")
return redirect(
Expand Down

0 comments on commit 84a3c62

Please sign in to comment.