mirror of
https://github.com/frappe/books.git
synced 2026-08-24 10:04:45 -05:00
fix: validate select for non mandatory unset value
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user