Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with LinkingSamplesUpdateJob #1889

Open
stuzart opened this issue May 22, 2024 · 1 comment
Open

Error with LinkingSamplesUpdateJob #1889

stuzart opened this issue May 22, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@stuzart
Copy link
Member

stuzart commented May 22, 2024

error occuring:

A TypeError occurred in background at 2024-05-22 00:12:14 UTC :

  no implicit conversion of String into Integer
  /srv/rails/fairdomhub/app/models/sample.rb:145:in `[]'

-------------------------------
Backtrace:
-------------------------------

  /srv/rails/fairdomhub/app/models/sample.rb:145:in `[]'
  /srv/rails/fairdomhub/app/models/sample.rb:145:in `block (3 levels) in refresh_linking_samples'
  /srv/rails/fairdomhub/app/models/sample.rb:144:in `each'
  /srv/rails/fairdomhub/app/models/sample.rb:144:in `block (2 levels) in refresh_linking_samples'
  /srv/rails/fairdomhub/app/models/sample.rb:142:in `each'
  /srv/rails/fairdomhub/app/models/sample.rb:142:in `block in refresh_linking_samples'
  /srv/rails/fairdomhub/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.7/lib/active_record/relation/delegation.rb:88:in `each'
  /srv/rails/fairdomhub/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.7/lib/active_record/relation/delegation.rb:88:in `each'
  /srv/rails/fairdomhub/app/models/sample.rb:138:in `refresh_linking_samples'

offending line https://github.com/seek4science/seek/blob/main/app/models/sample.rb#L145

I think with if sample['id'] == id , one is a String and the other and Integer, so needs converting

@stuzart stuzart added the bug label May 22, 2024
@stuzart stuzart added this to the 1.15.1 milestone May 22, 2024
@stuzart stuzart self-assigned this Jun 14, 2024
@stuzart
Copy link
Member Author

stuzart commented Jun 14, 2024

seems to be encountering an array instead of hash, and maybe related to multiple linked samples - but I've not yet been able to reproduce. Might be caused by being registered through the API

@stuzart stuzart modified the milestones: 1.15.1, 1.15.2 Jun 20, 2024
@stuzart stuzart modified the milestones: 1.15.2, 1.15.3 Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To do
Development

No branches or pull requests

1 participant