Commit 76731eb3 authored by raju249's avatar raju249

Add status 422 in case of errors only

parent 1d7bcbf3
......@@ -63,8 +63,12 @@ module NotesActions
json.merge!(note_json(@note))
end
if notes.errors && notes.errors.keys != [:commands_only]
render json: json, status: 422
else
render json: json
end
end
format.html { redirect_back_or_default }
end
end
......
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