Skip to content

Commit

Permalink
Make fix_update_logs_parsing more idiomatic
Browse files Browse the repository at this point in the history
  • Loading branch information
gabina committed Nov 7, 2023
1 parent 9778158 commit ec400de
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions setup/copy_course_from_production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,5 @@ def make_copy_of(url)
# When parsing update_logs from flags, keys are set as strings instead of integers
# This causes problems, so we need to force the keys to be integers.
def fix_update_logs_parsing(update_logs)
fixed_update_logs = {}
update_logs.each do |key, value|
# Add the new log with same value but integer key
fixed_update_logs[key.to_i] = value
end
fixed_update_logs
update_logs.transform_keys(&:to_i)
end

0 comments on commit ec400de

Please sign in to comment.