SDK v3 #8
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user