fix js errors

This commit is contained in:
Alex Turchyn
2024-05-30 00:35:35 +03:00
committed by Pete Matsyburka
parent c56f8cb38f
commit 7080e8ea33
4 changed files with 31 additions and 17 deletions
@@ -4,7 +4,9 @@ class TemplateDocumentsController < ApplicationController
load_and_authorize_resource :template
def create
return head :unprocessable_entity if params[:blobs].blank? && params[:files].blank?
if params[:blobs].blank? && params[:files].blank?
return render json: { error: 'File is missing' }, status: :unprocessable_entity
end
old_fields_hash = @template.fields.hash