5
11
Fork
You've already forked tomato
1

Fix task log from crashing when user is not on the task #125

Merged
edwardloveall merged 1 commit from el-fix-task-log-crash into main 2026年03月24日 15:30:12 +01:00

We recently allowed any type of user, not just volunteers, to be assigned to
tasks. Before that, you would have to create two accounts if you were an admin
that also wanted to get assigned to shifts. Some of those legacy accounts are
still around.

This causes errors if the volunteer user was assigned to a shift, and then the
admin user tries to enter a task log on the frontend. The error was being sent
correctly to the client, but the client was parsing it incorrectly and causing
the page to crash. Now it's displayed properly.

Waterfox

We recently allowed any type of user, not just volunteers, to be assigned to tasks. Before that, you would have to create two accounts if you were an admin that also wanted to get assigned to shifts. Some of those legacy accounts are still around. This causes errors if the volunteer user was assigned to a shift, and then the admin user tries to enter a task log on the frontend. The error was being sent correctly to the client, but the client was parsing it incorrectly and causing the page to crash. Now it's displayed properly. ![Waterfox](/attachments/a4dfe62d-d294-4340-885e-b69041e4853b)
edwardloveall force-pushed el-fix-task-log-crash from 211015cd0b
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
to 6382415325
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
2026年03月23日 21:26:21 +01:00
Compare
jsilasbailey left a comment
Copy link

👍

👍
@ -3,9 +3,9 @@ module Api
include ShiftEventOccurrenceLoader
before_action :load_occurrence, only: [:create]
before_action :authorize_resources, only: [:create]
First-time contributor
Copy link

👍

👍
edwardloveall force-pushed el-fix-task-log-crash from 6382415325
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
to 8c0af249e4
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
2026年03月24日 14:53:18 +01:00
Compare
edwardloveall changed target branch from el-org-logo-receipt to main 2026年03月24日 15:29:53 +01:00
edwardloveall deleted branch el-fix-task-log-crash 2026年03月24日 15:30:15 +01:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato!125
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "el-fix-task-log-crash"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?