#3274 - ActionView::Template::Error) "undefined method `expiration_period' for nil:NilClass"

An ActionView::Template::Error occurred in background at 2022-12-19 09:24:26 UTC :

 undefined method `expiration_period' for nil:NilClass
 /var/www/bikelink/app/models/g7_latch_control_boards/message.rb:76:in `random_encryption_key'

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

 /var/www/bikelink/app/models/g7_latch_control_boards/message.rb:76:in `random_encryption_key'
 /var/www/bikelink/app/views/api/mobile/v01/technician_app/g7/latch_control_boards/random_encryption_key.json.jbuilder:3:in `block in _app_views_api_mobile_v___technician_app_g__latch_control_boards_random_encryption_key_json_jbuilder___1996781690251534038_614600'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/jbuilder-2.11.5/lib/jbuilder.rb:42:in `block in set!'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/jbuilder-2.11.5/lib/jbuilder.rb:296:in `block in _merge_block'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/jbuilder-2.11.5/lib/jbuilder.rb:347:in `_scope'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/jbuilder-2.11.5/lib/jbuilder.rb:296:in `_merge_block'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/jbuilder-2.11.5/lib/jbuilder.rb:42:in `set!'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/jbuilder-2.11.5/lib/jbuilder/jbuilder_template.rb:133:in `set!'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/jbuilder-2.11.5/lib/jbuilder.rb:70:in `method_missing'
 /var/www/bikelink/app/views/api/mobile/v01/technician_app/g7/latch_control_boards/random_encryption_key.json.jbuilder:1:in `_app_views_api_mobile_v___technician_app_g__latch_control_boards_random_encryption_key_json_jbuilder___1996781690251534038_614600'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/actionview-6.0.5.1/lib/action_view/base.rb:274:in `_run'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/actionview-6.0.5.1/lib/action_view/template.rb:185:in `block in render'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/activesupport-6.0.5.1/lib/active_support/notifications.rb:180:in `block in instrument'
 /var/www/bikelink/vendor/bundle/ruby/3.0.0/gems/activesupport-6.0.5.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'

-------------------------------
Data:
-------------------------------

 * data: {}
Znovu načítať