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
psd-issuerbot
changed the title
[BUG] print_jobs#create (NoMethodError) "undefined method 'id' for nil:NilClass"
Y24-287 - [BUG] print_jobs#create (NoMethodError) "undefined method 'id' for nil:NilClass"
Aug 29, 2024
BenTopping
changed the title
Y24-287 - [BUG] print_jobs#create (NoMethodError) "undefined method 'id' for nil:NilClass"
Y24-287 - [BUG] Exception 27/08/2024 at 13:50
Aug 29, 2024
When a label template which doesn't exist in print my barcode is attempted to be accessed in app/models/print_job.rb it throws an error. In this case it is the template 'sqsc_384plate_label_template_code39'. This template is documented as unusable but included 'for completeness', see comment here.
This was accessed because a user, presumably incorrectly, tried to print a 'plate_384_single' template to a toshiba printer. The toshiba printer is still selectable, despite not having a valid template, because limber displays all 384 printers and doesn't have a filter for print service type.
Fix
Handle label template check safely in app/models/print_job.rb for the case where the label template does not exist. It now provides a clear error message: Pmb Unable to find label template: <template_name>.
Email subject line
[Psd-exceptions] [Limber PRODUCTION] print_jobs#create (NoMethodError) "undefined method `id' for nil:NilClass"
Error body
Acceptance Criteria
Additional information
The id of the user who triggered this error is often shown in the exception email, in case you need to communicate with them.
The text was updated successfully, but these errors were encountered: