Unverified Commit 0e4d954f authored by Atallah khedrane's avatar Atallah khedrane Committed by GitHub

Return error when wrong filtering field

When end user put wrong filtering field ORM should return error instead of Panic()
so developers can handle this error.
parent 053a0753
......@@ -928,7 +928,7 @@ func (d *dbBase) ReadBatch(q dbQuerier, qs *querySet, mi *modelInfo, cond *Condi
maps[fi.column] = true
}
} else {
panic(fmt.Errorf("wrong field/column name `%s`", col))
return -1, fmt.Errorf("wrong field/column name `%s`", col)
}
}
if hasRel {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment