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

Fix repo processing crash when labels contained an integer #5098

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

bmesuere
Copy link
Member

This pull request fixes an issue that crashed exercise repository processing when the labels contained an integer. All elements in labels are now first converted to a string before downcasing.

The error we received was

A NoMethodError occurred in repositories#reprocess:

  undefined method `downcase' for 1339:Integer

    hash['labels'] = hash['labels'].map(&:downcase).uniq if hash.key? 'labels'
                                   ^^^^
  app/models/activity.rb:503:in `map'

This issue was encountered by @bmoelans.

@bmesuere bmesuere added the bug Something isn't working label Oct 31, 2023
@bmesuere bmesuere requested a review from a team as a code owner October 31, 2023 17:09
@bmesuere bmesuere requested review from niknetniko and jorg-vr and removed request for a team October 31, 2023 17:09
@bmesuere bmesuere merged commit 57c958d into main Nov 6, 2023
15 checks passed
@bmesuere bmesuere deleted the fix/convert-labels-to-strings branch November 6, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants