From 7cba992174582fd7d9fb98c5d94ee15e15bfd8d0 Mon Sep 17 00:00:00 2001 From: Eraxyso <130852025+Eraxyso@users.noreply.github.com> Date: Mon, 2 Sep 2024 18:43:48 +0000 Subject: [PATCH] fix: specify model of db request in functions respondents/GetMyResponseIDs and targets/IsTargetingMe --- model/respondents_impl.go | 1 + model/targets_impl.go | 1 + 2 files changed, 2 insertions(+) diff --git a/model/respondents_impl.go b/model/respondents_impl.go index 3c7a6cb0..2cbf4aaf 100755 --- a/model/respondents_impl.go +++ b/model/respondents_impl.go @@ -395,6 +395,7 @@ func (*Respondent) GetMyResponseIDs(ctx context.Context, userID string) ([]int, responsesID := []int{} err = db. + Model(&Respondents{}). Where("user_traqid = ?", userID). Select("response_id"). Find(&responsesID).Error diff --git a/model/targets_impl.go b/model/targets_impl.go index 41350884..6e046217 100644 --- a/model/targets_impl.go +++ b/model/targets_impl.go @@ -89,6 +89,7 @@ func (*Target) IsTargetingMe(ctx context.Context, questionnairID int, userID str var count int64 err = db. + Model(&Targets{}). Where("questionnaire_id = ? AND user_traqid = ?", questionnairID, userID). Count(&count).Error if err != nil {