Commit 9dc2e7f2 authored by raju249's avatar raju249

Add check for empty keys

parent 8957e46a
...@@ -63,7 +63,7 @@ module NotesActions ...@@ -63,7 +63,7 @@ module NotesActions
json.merge!(note_json(@note)) json.merge!(note_json(@note))
end end
if @note.errors && @note.errors.keys != [:commands_only] if @note.errors && @note.errors.keys != [] && @note.errors.keys != [:commands_only]
render json: json, status: 422 render json: json, status: 422
else else
render json: json render json: json
......
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