danmunn / redmine_dmsf

Fork of svn repository for redmine_dmsf
GNU General Public License v2.0
418 stars 194 forks source link

fix .zero? error in id_attribute check #1459

Closed NGeb1 closed 1 year ago

NGeb1 commented 1 year ago

I got this error when searching:

[6adb7d18-ed52-428b-ad9c-8c602234****] NoMethodError (undefined method `zero?' for "25496":String

          next if dmsf_attrs.length.zero? || id_attribute.zero?
                                                     ^^^^^^):
[6adb7d18-ed52-428b-ad9c-8c602234****]
[6adb7d18-ed52-428b-ad9c-8c602234****] plugins/redmine_dmsf/app/models/dmsf_file.rb:425:in `block in search'

so I added ".to_i" before the .zero? to fix the error.

picman commented 1 year ago

Thank you!