Deleting an Account with a transfer on it will cause an error when editing the transfer
edavis10 opened this issue · comments
- Create Account A
- Create Account B
- Create a transfer from Account A to Account B
- Delete Account B
- Transfer still exists
- Edit Transfer
- Error
Version: 120e981
ActionView::TemplateError (You have a nil object when you didn't expect it! The error occurred while evaluating nil.checking?) on line #8 of app/views/events/_form_section.html.haml: 5: = account_prompt 6: = select_account(section, accounts, selected_account && selected_account.id) 7: - if section_wants_check_options?(section) 8: %span{:id => "#{section}.check_options", :style => visible?(check_options_visible_for?(section))} 9: == Check ##{form.text_field :check_number, :size => 6} 10: - if section_wants_repayment_options?(section) 11: %span.repayment_options{:id => "#{section}.repayment_options", :style => visible?(repayment_options_visible_for?(section))} app/helpers/events_helper.rb:200:in `check_options_visible_for?' app/views/events/_form_section.html.haml:8:in `_run_haml_app47views47events47_form_section46html46haml_locals_account_prompt_accounts_form_form_section_multi_bucket_prompt_object_section_selected_account_single_bucket_prompt_title' vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:12:in `render' vendor/plugins/haml/rails/./lib/haml/helpers.rb:57:in `non_haml' vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:12:in `render' app/helpers/events_helper.rb:313:in `render_event_form_section' app/views/events/_form.html.haml:25:in `_run_haml_app47views47events47_form46html46haml_locals_form_object' app/views/events/_form.html.haml:22:in `each' app/views/events/_form.html.haml:22:in `_run_haml_app47views47events47_form46html46haml_locals_form_object' vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:165:in `call' vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:165:in `form_for' vendor/plugins/haml/rails/./lib/haml/helpers.rb:447:in `call' vendor/plugins/haml/rails/./lib/haml/helpers.rb:447:in `haml_bind_proc' vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:171:in `form_for' app/views/events/_form.html.haml:11:in `_run_haml_app47views47events47_form46html46haml_locals_form_object' vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:12:in `render' vendor/plugins/haml/rails/./lib/haml/helpers.rb:57:in `non_haml' vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:12:in `render' app/views/events/edit.html.haml:8:in `_run_haml_app47views47events47edit46html46haml' vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:14:in `render' vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:14:in `render' vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:in `process'
Thanks for reporting this. I just committed a fix in e33f867.