From 03a7129efd324e74a4ca86a265d236a5439012e6 Mon Sep 17 00:00:00 2001 From: Mia Bennett <mia@chillfox.com> Date: Mon, 13 Jan 2025 16:32:33 +0930 Subject: [PATCH] fix(bookings): prefix checked_in with bookings in sql (#279) --- src/placeos-models/booking.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/placeos-models/booking.cr b/src/placeos-models/booking.cr index d5971c83..871f7053 100644 --- a/src/placeos-models/booking.cr +++ b/src/placeos-models/booking.cr @@ -372,7 +372,7 @@ module PlaceOS::Model where(checked_in: check) else # checked_in defaults to false, so only checked out if checked_out_at is set - where("checked_out_at IS NOT NULL AND checked_in = ?", check) + where("checked_out_at IS NOT NULL AND bookings.checked_in = ?", check) end else self