dobo 2.30.4 → 2.30.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ async function sanitizeBody ({ body = {}, partial, strict, extFields = [], noDef
26
26
 
27
27
  const omitted = []
28
28
  const details = []
29
- const properties = [...this.getProperties(), ...extFields]
29
+ const properties = [...this.getNonVirtualProperties(), ...extFields]
30
30
  for (const prop of properties) {
31
31
  try {
32
32
  if (partial && !has(body, prop.name)) {
@@ -40,7 +40,8 @@ async function sanitizeRecord (record = {}, opts = {}) {
40
40
  let value = ['object', 'array'].includes(prop.type) ? cloneDeep(newRecord[key]) : newRecord[key]
41
41
  if (prop.values) {
42
42
  const values = await this.buildPropValues(prop, opts)
43
- value = (values.find(v => v.value === value) ?? {}).text ?? value
43
+ if (isArray(value)) value = value.map(v => (values.find(opt => opt.value === v) ?? {}).text ?? v)
44
+ else value = (values.find(v => v.value === value) ?? {}).text ?? value
44
45
  }
45
46
  if (prop.format === false) newRecord._fmt[key] = value + ''
46
47
  else if (isFunction(prop.format)) newRecord._fmt[key] = await prop.format.call(this, value, newRecord, opts)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dobo",
3
- "version": "2.30.4",
3
+ "version": "2.30.5",
4
4
  "description": "DBMS for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-06-24
4
+
5
+ - [2.30.5] Bug fix in ```model.sanitizeBody()```
6
+ - [2.30.5] Bug fix in ```model.sanitizeRecord()```
7
+
3
8
  ## 2026-06-16
4
9
 
5
10
  - [2.30.4] Bug fix in ```model.sanitizeBody()```