mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: validate select for non mandatory unset value
This commit is contained in:
parent
25f7e51312
commit
53b0eea4f2
@ -254,6 +254,9 @@ module.exports = class BaseMeta extends BaseDocument {
|
|||||||
validateSelect(field, value) {
|
validateSelect(field, value) {
|
||||||
let options = field.options;
|
let options = field.options;
|
||||||
if (!options) return;
|
if (!options) return;
|
||||||
|
if (!field.required && value == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let validValues = options;
|
let validValues = options;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user