Skip to content

Fix crashing "My stores" page for users without home district

Alex requested to merge fix-storegateway-bug into master

Closes #936 (closed)

What does this MR do?

Fixes the crash of the "Alle meine Betriebe" page with HTTP 500 if the user has no home district.

How confident are you it won't break things if deployed?

Very sure

How to test

Steps a reviewer can take to verify that this MR does what it says it does e.g.

  1. Checkout branch locally
  2. Remove the home district of a user from the database: table 'fs_foodsaver' -> set 'bezirk_id' to 0
  3. Login as that user
  4. Go to "My stores" page: http://localhost:18080/?page=fsbetrieb
  5. The page should not fail and show a table with stores

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to create a testing issue in Beta Testing Repo:
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...). how this change can be tested.
    • Be aware, that also non technical people should understand.

Merge request reports