Skip to content

Commit 527aaa7

Browse files
committed
fix: clear scheduled_at when match enters Veto status (#351)
The scheduled_at field was never cleared when a match progressed past scheduling, causing the "Scheduled" badge to persist in the UI during Veto. Clear it in the Veto transition block since the schedule is fulfilled once veto starts. The cancels_at calculation is unaffected as it uses a local variable captured earlier in the trigger.
1 parent 87e6e0f commit 527aaa7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

hasura/triggers/matches.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ BEGIN
333333
NEW.cancels_at = COALESCE(scheduled_at, NOW()) + (_auto_cancel_duration)::interval;
334334
END IF;
335335
NEW.ended_at = null;
336+
NEW.scheduled_at = null;
336337
END IF;
337338

338339
IF NEW.status = 'WaitingForServer' AND OLD.status != 'WaitingForServer' THEN

0 commit comments

Comments
 (0)