SQL: Fix missing org error messages (#26785)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen 2020-08-04 17:06:37 +02:00 committed by GitHub
parent 150778df1a
commit e344ff01ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,9 +245,9 @@ func getOrCreateOrg(sess *DBSession, orgName string) (int64, error) {
org.Name = mainOrgName
org.Id = int64(setting.AutoAssignOrgId)
} else {
sqlog.Info("Could not create user: organization id %v does not exist",
sqlog.Error("Could not create user: organization ID does not exist", "orgID",
setting.AutoAssignOrgId)
return 0, fmt.Errorf("Could not create user: organization id %v does not exist",
return 0, fmt.Errorf("could not create user: organization ID %d does not exist",
setting.AutoAssignOrgId)
}
} else {