From 255165627faf7f410f2785a71e991b584b357fe3 Mon Sep 17 00:00:00 2001 From: Mia Bennett Date: Wed, 1 Feb 2023 18:08:54 +0930 Subject: [PATCH] fix(staff_api): check sent for not nil in #get_survey_invites --- drivers/place/staff_api.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/place/staff_api.cr b/drivers/place/staff_api.cr index a86ff2930a3..95911a02ebf 100644 --- a/drivers/place/staff_api.cr +++ b/drivers/place/staff_api.cr @@ -577,7 +577,7 @@ class Place::StaffAPI < PlaceOS::Driver logger.debug { "getting survey_invites (survey #{survey_id}, sent #{sent})" } params = URI::Params.new params["survey_id"] = survey_id.to_s if survey_id - params["sent"] = sent.to_s if sent + params["sent"] = sent.to_s if !sent.nil? params = params.empty? ? "" : "?#{params}" response = get("/api/staff/v1/surveys/invitations#{params}", headers: authentication) raise "issue getting survey invitations (survey #{survey_id}, sent #{sent}): #{response.status_code}" unless response.success?