You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing an event type, it’s possible to blank the length field:
This triggers a server error during validation:
Started PATCH "/admin/conferences/example/program/event_types/1"
Processing by Admin::EventTypesController#update as HTML
Parameters: {"authenticity_token"=>"[FILTERED]", "event_type"=>{"title"=>"Talk", "length"=>"", "description"=>"Presentation in lecture format", "minimum_abstract_length"=>"0", "maximum_abstract_length"=>"500", "color"=>"#ff0000"}, "commit"=>"Update Event type", "conference_id"=>"example", "id"=>"1"}
Completed 500 Internal Server Error
NoMethodError (undefined method `%' for nil:NilClass
errors.add(:length, "must be a divisor of #{program.schedule_interval}") if program && length % program.schedule_interval != 0
^):
app/models/event_type.rb:27:in `length_step'
app/controllers/admin/event_types_controller.rb:29:in `update'
Expected correct behavior
Either a validation error (not a server error) is returned or a default value is used.
Steps to reproduce
Create a conference.
At Manage → Event Types → Edit, blank the Length field and click Update Event type.
Other information
I briefly researched whether the length_step validation could be made dependent on the numericality validation, but didn’t find a straightforward solution.
The text was updated successfully, but these errors were encountered:
I'm submitting a…
Current behavior
When editing an event type, it’s possible to blank the length field:
This triggers a server error during validation:
Expected correct behavior
Either a validation error (not a server error) is returned or a default value is used.
Steps to reproduce
Other information
I briefly researched whether the
length_step
validation could be made dependent on thenumericality
validation, but didn’t find a straightforward solution.The text was updated successfully, but these errors were encountered: