Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locker violations page -> Clicking on New locker violation triggers an error page #314

Open
christinach opened this issue Aug 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@christinach
Copy link
Member

christinach commented Aug 14, 2024

Expected behavior

When I click on /locker_violations/new I expect to see the new form page to create a new locker violation

Actual behavior

When I click on /locker_violations/new I get an error NoMethodError: undefined method location' for nil:NilClass`

Steps to replicate

Go to /locker_violations
Click on the link 'New LockerViolation'

Impact of this bug

E.g. "I can't work until this is fixed" or "I have a workaround"

Honeybadger link and code snippet, if applicable

Honeybadger

Message NoMethodError: undefined method location' for nil:NilClass`

/app/views/locker_violations/_form.html.erb:17:in `block in _app_views_locker_violations__form_html_erb'</div>">
15 | <grid-item columns="lg-2 md-4 sm-12">
-- | --
16 | <strong>Locker:</strong>
17 | <span><%= locker_violation.locker.location %></span>
18 | </grid-item>
19 | <grid-item columns="lg-1 md-4 sm-12">

</div>
@christinach christinach added the bug Something isn't working label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant