Skip to content

Commit

Permalink
[api] Replace two post ifs with a block
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Jun 26, 2018
1 parent 09b8d88 commit 63767e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/app/controllers/attribute_controller.rb
Expand Up @@ -205,8 +205,10 @@ def cmd_attribute
req.elements('attribute') do |attr|
changed = true if @attribute_container.store_attribute_xml(attr, @binary)
end
logger.debug "Attributes for #{@attribute_container.class} #{@attribute_container.name} changed, writing to backend" if changed
@attribute_container.write_attributes(params[:comment]) if changed
if changed
logger.debug "Attributes for #{@attribute_container.class} #{@attribute_container.name} changed, writing to backend"
@attribute_container.write_attributes(params[:comment])
end
render_ok
end

Expand Down

0 comments on commit 63767e4

Please sign in to comment.