From 8d78b96970e91f4e42adb1d210f4df79679234ac Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Tue, 28 Sep 2021 17:57:42 +1000 Subject: [PATCH] fix(events update): unable to mark visitor as unexpected (#122) after marking them as expected --- src/controllers/events.cr | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/controllers/events.cr b/src/controllers/events.cr index 0be78dc8..3ed9762a 100644 --- a/src/controllers/events.cr +++ b/src/controllers/events.cr @@ -437,18 +437,20 @@ class Events < Application attend.visit_expected else attend.set({ - visit_expected: true, - checked_in: false, - tenant_id: tenant.id, + checked_in: false, + tenant_id: tenant.id, }) false end attend.update!({ - event_id: meta.id.not_nil!, - guest_id: guest.id, + event_id: meta.id.not_nil!, + guest_id: guest.id, + visit_expected: attendee.visit_expected.not_nil!, }) + next unless attend.visit_expected + if !previously_visiting || changing_room spawn do sys = system.not_nil!