mirror of
https://github.com/frappe/books.git
synced 2024-12-25 20:11:15 +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) {
|
||||
let options = field.options;
|
||||
if (!options) return;
|
||||
if (!field.required && value == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
let validValues = options;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user