Properly check for discriminator field in context
This commit is contained in:
@@ -49,7 +49,11 @@ func BuildInsertOne(col map[string]any, report *InitReport) {
|
||||
if isSystem {
|
||||
db = sysDb
|
||||
} else {
|
||||
account := ctx.Value("account").(string)
|
||||
accountAny := ctx.Value("account")
|
||||
if accountAny == nil {
|
||||
return nil, fmt.Errorf("account required for %s", name)
|
||||
}
|
||||
account := accountAny.(string)
|
||||
if account != "" {
|
||||
db = mc.GetName(account)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user