Crashes when visiting /customers/<id>/tasks/new #14

Closed
opened 2020-04-12 11:56:28 +02:00 by paul · 1 comment
Owner

Camping error report:

MethodError at /customers/5/tasks/new
  undefined method `empty?' for nil:NilClass
Traceback (innermost first)

/home/paul/Projects/stoptime/stoptime.rb: in _form_select
    if opts_list.empty?...
/home/paul/Projects/stoptime/stoptime.rb: in task_form
          _form_select("customer", @customer_list)...
/usr/lib/ruby/1.8/markaby/builder.rb: in instance_eval
      str = instance_eval(&block)...
/usr/lib/ruby/1.8/markaby/builder.rb: in capture
      str = instance_eval(&block)...
/usr/lib/ruby/1.8/markaby/builder.rb: in tag!
        str = capture &block...
(eval): in tag!
/usr/lib/ruby/1.8/markaby/builder.rb: in html_tag
      tag!(sym, *args, &block)...
(eval): in li
/home/paul/Projects/stoptime/stoptime.rb: in task_form
        li do...
/usr/lib/ruby/1.8/markaby/builder.rb: in instance_eval
      str = instance_eval(&block)...
/usr/lib/ruby/1.8/markaby/builder.rb: in capture
      str = instance_eval(&block)...
/usr/lib/ruby/1.8/markaby/builder.rb: in tag!
        str = capture &block...
(eval): in tag!
/usr/lib/ruby/1.8/markaby/builder.rb: in html_tag
      tag!(sym, *args, &block)...
(eval): in ol
/home/paul/Projects/stoptime/stoptime.rb: in task_form

(Imported from Ticgit issue ae0311.)

Camping error report: ```text MethodError at /customers/5/tasks/new undefined method `empty?' for nil:NilClass Traceback (innermost first) /home/paul/Projects/stoptime/stoptime.rb: in _form_select if opts_list.empty?... /home/paul/Projects/stoptime/stoptime.rb: in task_form _form_select("customer", @customer_list)... /usr/lib/ruby/1.8/markaby/builder.rb: in instance_eval str = instance_eval(&block)... /usr/lib/ruby/1.8/markaby/builder.rb: in capture str = instance_eval(&block)... /usr/lib/ruby/1.8/markaby/builder.rb: in tag! str = capture &block... (eval): in tag! /usr/lib/ruby/1.8/markaby/builder.rb: in html_tag tag!(sym, *args, &block)... (eval): in li /home/paul/Projects/stoptime/stoptime.rb: in task_form li do... /usr/lib/ruby/1.8/markaby/builder.rb: in instance_eval str = instance_eval(&block)... /usr/lib/ruby/1.8/markaby/builder.rb: in capture str = instance_eval(&block)... /usr/lib/ruby/1.8/markaby/builder.rb: in tag! str = capture &block... (eval): in tag! /usr/lib/ruby/1.8/markaby/builder.rb: in html_tag tag!(sym, *args, &block)... (eval): in ol /home/paul/Projects/stoptime/stoptime.rb: in task_form ``` *(Imported from Ticgit issue ae0311.)*
paul added the
bug
label 2020-04-12 11:56:31 +02:00
Author
Owner

Fixed crash in CustomersNTasksNew#get

The @customer_list was not set.
Also made Views#_form_select more robust by also catching undefined lists and treating them as empty lists.

Closed by commit 218b3e45a4.

Fixed crash in `CustomersNTasksNew#get` The `@customer_list` was not set. Also made `Views#_form_select` more robust by also catching undefined lists and treating them as empty lists. Closed by commit 218b3e45a4890d3c37dde148dbe2a88cda89df01.
paul closed this issue 2020-04-12 11:57:32 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mozcode/stoptime#14
No description provided.