Erro ano letivo serie idiario

Fala pessoal, estou com o seguinte erro:

2024-11-15T22:54:09.347Z 3282 TID-ox5108h0a WARN: NoMethodError: undefined method map’ for nil:NilClass2024-11-15T22:54:09.348Z 3282 TID-ox5108h0a WARN: /home/master/i-diario/app/services/ieducar_synchronizers/school_calendar_discipline_grades_synchronizer.rb:60:in combine_discipline_years_and_steps’/home/master/i-diario/app/services/ieducar_synchronizers/school_calendar_discipline_grades_synchronizer.rb:28:in block in update_school_calendar_discipline_grade’/home/master/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/delegate.rb:83:in each’/home/master/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/delegate.rb:83:in method_missing’/home/master/i-diario/app/services/ieducar_synchronizers/school_calendar_discipline_grades_synchronizer.rb:23:in update_school_calendar_discipline_grade’/home/master/i-diario/app/services/ieducar_synchronizers/school_calendar_discipline_grades_synchronizer.rb:3:in synchronize!‘/home/master/i-diario/app/services/ieducar_synchronizers/base_synchronizer.rb:19:in synchronize!’/home/master/i-diario/app/workers/ieducar/synchronizer_executer_worker.rb:9:in block in perform’/home/master/i-diario/vendor/bundle/ruby/2.6.0/bundler/gems/activerecord-connections-22c6a47dbc01/lib/active_record/connections.rb:32:in using_connection’/home/master/i-diario/app/models/entity.rb:23:in using_connection’/home/master/i-diario/app/workers/ieducar/synchronizer_executer_worker.rb:5:in perform’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb:192:in execute_job’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb:165:in block (2 levels) in process’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/middleware/chain.rb:128:in block in invoke’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/server/middleware.rb:34:in block (2 levels) in call’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb:21:in block (2 levels) in execute’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/lock/while_executing.rb:38:in execute’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb:21:in block in execute’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb:37:in lock_on_failure’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb:20:in execute’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/server/middleware.rb:33:in block in call’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb:43:in block in with_context’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/logging.rb:48:in with_context’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb:43:in with_context’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/server/middleware.rb:32:in call’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/middleware/chain.rb:130:in block in invoke’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/honeybadger-5.5.0/lib/honeybadger/plugins/sidekiq.rb:10:in call’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/middleware/chain.rb:130:in block in invoke’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/middleware/chain.rb:133:in invoke’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb:164:in block in process’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb:137:in block (6 levels) in dispatch’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/job_retry.rb:109:in local’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb:136:in block (5 levels) in dispatch’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/rails.rb:43:in block in call’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/execution_wrapper.rb:85:in wrap’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/reloader.rb:68:in block in wrap’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/execution_wrapper.rb:85:in wrap’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/reloader.rb:67:in wrap’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/rails.rb:42:in call’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb:132:in block (4 levels) in dispatch’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb:250:in stats’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb:127:in block (3 levels) in dispatch’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/job_logger.rb:8:in call’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb:126:in block (2 levels) in dispatch’/home/master/i-diario/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/job_retry.rb:74:in global'

verifiquei aqui que o erro está no arquivo school_calendar_discipline_grades_synchronizer.rb
no parte do codigo :

 def combine_discipline_years_and_steps(discipline_years, discipline_steps)
 42
 43     combined_records = {}
 44
 45     discipline_years.map do |discipline_year|
 46       grade_api_code = discipline_year[:serie_id]
 47       combined_records[grade_api_code] ||= {
 48         grade_api_code: grade_api_code, disciplines: {}
 49       }
 50
 51       discipline_year[:disciplinas_anos_letivos].each do |discipline_and_years|
 52         discipline_api_code = discipline_and_years.to_h.keys.first.to_s.split(',').first.to_i
 53         years = discipline_and_years.to_h.values.flatten
 54
 55         combined_records[grade_api_code][:disciplines][discipline_api_code] ||= { years: [], steps: [] }
 56         combined_records[grade_api_code][:disciplines][discipline_api_code][:years] ||= []
 57         combined_records[grade_api_code][:disciplines][discipline_api_code][:years].concat(years)
 58       end
 59     end

isto está trazendo uma valor nill e esta é a causa raiz de não conseguir fazer a sincronização.
alguém ai sabe como posso resilver isto ?

@Neto vi que vc passou porrisso tempos atrás.