Skip to content

Commit

Permalink
Update images_controller.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored and dependabot-preview[bot] committed Mar 19, 2021
1 parent 965e0b6 commit 07a243d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/images_controller.rb
Expand Up @@ -33,7 +33,7 @@ def create
title: params[:image][:title],
notes: params[:image][:notes])
end
@image.nid = Node.find(params[:nid].to_i).nid unless params[:nid].nil? || params[:nid] == 'undefined'
@image.nid = Node.find(params[:nid].to_i).nid unless params[:nid].nil? || params[:nid] == 'undefined' || params[:nid].to_i == 0
if @image.save!
render json: {
id: @image.id,
Expand Down

0 comments on commit 07a243d

Please sign in to comment.