MoralCode/ClassClock

UI gets stuck on "Fetching..." screen if a previously-selected school is unavailable

Opened this issue · 4 comments

Describe the bug
If a school and/or bell schedule gets deleted from the database, all users who had that schedule selected previously will be shown a screen that says "Fetching" with no apparent way out.

This can be worked around by manually navigating to the /select page and selecting a new school from that list.

To Reproduce
Steps to reproduce the behavior:

  1. Create a school (and optionally also a schedule) in the database
  2. open the ClassClock app in a fresh browser tab/window with browsing data cleared for the classclock site
  3. manually delete the schedule (and optionally also the school) from the database and create a new one with a different id.

Expected behavior
The page should detect the 404 error for the school and/or the schedule and either show the user an error or send them back to the select school page automatically.

Hi, I'd like to work on this issue. Can you please assign it to me?

Done! Thanks for reaching out!

Let me know if you have any questions on how to reproduce this. I'm also pretty responsive on the slack/gitter channels for classclock if you would prefer a more chat-based style of communication.

The documentation on this project and the associated API (https://github.com/MoralCode/ClassClockAPI) is not quite where I would like it to be. I would love to know if there's any areas that are hard to understand for people who are new to the codebase.

I should probably also clarify that this issue is only present on the development branch.

@AlexVCS any updates on this? are you still interested in working on it?

Removed assignee due to lack of activity on this issue.

Dev branch has also been merged to main so this is now a mainline issue, but that said, it seems to only surface when a school is deleted, which is likely quite a rare event in most real-world production deployments