mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-28 01:36:33 +08:00
Fix Hound errors
This commit is contained in:
parent
c1c73ad804
commit
a7f8aad62c
1 changed files with 4 additions and 4 deletions
|
@ -9,12 +9,12 @@ class RenameNonUniqueSampleTypesGroups < ActiveRecord::Migration
|
|||
end
|
||||
end
|
||||
|
||||
next if st_ids.count == 0
|
||||
next if st_ids.count.zero?
|
||||
|
||||
cntr = -1
|
||||
SampleType.where(id: st_ids).find_each do |st|
|
||||
cntr += 1
|
||||
next if cntr == 0
|
||||
next if cntr.zero?
|
||||
new_name = "#{st.name} (#{cntr})"
|
||||
st.update(name: new_name)
|
||||
end
|
||||
|
@ -29,12 +29,12 @@ class RenameNonUniqueSampleTypesGroups < ActiveRecord::Migration
|
|||
end
|
||||
end
|
||||
|
||||
next if sg_ids.count == 0
|
||||
next if sg_ids.count.zero?
|
||||
|
||||
cntr = -1
|
||||
SampleGroup.where(id: sg_ids).find_each do |sg|
|
||||
cntr += 1
|
||||
next if cntr == 0
|
||||
next if cntr.zero?
|
||||
new_name = "#{sg.name} (#{cntr})"
|
||||
sg.update(name: new_name)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue