Fix error in user calendar activities where timezone is incorrectly set
requested to merge davebarr/gitlab:346113-fix-incorrect-timezone-on-calendar-activities-page into master
What does this MR do and why?
This MR fixes an issue when clicking on a user's contribution calendar, where their preferred timezone is set incorrectly (either a blank string or an unknown timezone) would result in a HTTP 500 error.
How to set up and validate locally
- Visit http://localhost:3000/root
- Click on a day of the year with a contribution in it and see contributions load correctly
- Run
UserPreference::find(1).update!(timezone: 'nonexist')
- Repeat Step 2 and notice a HTTP 500 error is no longer thrown.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #346113 (closed)