fix archived false api

This commit is contained in:
Pete Matsyburka committed 2024-11-29 13:30:33 +02:00
1 parent 75683631f0
commit eec266ee83
1 file changed
+1 -1
+1 -1
View File
@@ -87,7 +87,7 @@ module Api
def filter_templates(templates, params)
templates = Templates.search(templates, params[:q])
templates = params[:archived] ? templates.archived : templates.active
templates = params[:archived].in?(['true', true]) ? templates.archived : templates.active
templates = templates.where(external_id: params[:application_key]) if params[:application_key].present?
templates = templates.where(external_id: params[:external_id]) if params[:external_id].present?
templates = templates.joins(:folder).where(folder: { name: params[:folder] }) if params[:folder].present?