Skip to content

Commit

Permalink
[api] implify code
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Dec 12, 2014
1 parent 7f32c05 commit 03544bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/models/maintenance_incident.rb
Expand Up @@ -54,7 +54,7 @@ def initUpdateinfoId(template = "%Y-%C", patch_name = nil)
day = "NULL"
end
if template =~ /%N/
name = "'" + (self.name||"") + "'"
name = ActiveRecord::Base.connection.quote(self.name||"")
counterType << " AND name = " + name
else
counterType << " AND ISNULL(name)"
Expand Down

1 comment on commit 03544bc

@vpereira
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this code as a whole. Please take a look on this commit vpereira@7ed4c9e

Please sign in to comment.