2
0
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:
Faris Ansari 2019-12-27 22:04:45 +05:30
parent 25f7e51312
commit 53b0eea4f2

View File

@ -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;