diff --git a/pkg/database/source.go b/pkg/database/source.go index d9d1db5..d808b74 100644 --- a/pkg/database/source.go +++ b/pkg/database/source.go @@ -70,7 +70,7 @@ func GetUserSourceByID(ctx context.Context, id models.UserSourceID) (models.User return models.UserSource{}, &otterError.EntityValidationFailed{Reason: otterError.UserSourceIDToShort} } - result := client.WithContext(ctx).First(&user, id) + result := client.WithContext(ctx).First(&user, "id = ?", id) if result.Error != nil { if errors.Is(result.Error, gorm.ErrRecordNotFound) { return models.UserSource{}, &otterError.Database{Reason: otterError.NoDataFound}