dobo 2.30.6 → 2.30.7
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.
|
@@ -173,7 +173,7 @@ export async function getRefs (records = [], options = {}) {
|
|
|
173
173
|
const { isSet } = this.app.lib.aneka
|
|
174
174
|
const { uniq, without, get } = this.app.lib._
|
|
175
175
|
const { parseQuery } = this.app.dobo
|
|
176
|
-
const props = this.
|
|
176
|
+
const props = this.getNonVirtualProperties().filter(p => isSet(p.ref) && !(options.hidden ?? []).includes(p.name))
|
|
177
177
|
options.refs = options.refs ?? []
|
|
178
178
|
if (props.length > 0) {
|
|
179
179
|
for (const prop of props) {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @param {Array} [options.extFields=[]]
|
|
13
13
|
* @returns {Object}
|
|
14
14
|
*/
|
|
15
|
-
async function sanitizeBody ({ body = {}, partial, strict, extFields = [], noDefault, truncateString, onlyTypes = [], action } = {}) {
|
|
15
|
+
async function sanitizeBody ({ body = {}, partial, strict, extFields = [], noDefault, truncateString, onlyTypes = [], action, allProps } = {}) {
|
|
16
16
|
const { isSet } = this.app.lib.aneka
|
|
17
17
|
const { sanitizeByType } = this.app.dobo
|
|
18
18
|
const { omit, has } = this.app.lib._
|
|
@@ -26,7 +26,8 @@ async function sanitizeBody ({ body = {}, partial, strict, extFields = [], noDef
|
|
|
26
26
|
|
|
27
27
|
const omitted = []
|
|
28
28
|
const details = []
|
|
29
|
-
const
|
|
29
|
+
const props = allProps ? this.properties : this.getNonVirtualProperties()
|
|
30
|
+
const properties = [...props, ...extFields]
|
|
30
31
|
for (const prop of properties) {
|
|
31
32
|
try {
|
|
32
33
|
if (partial && !has(body, prop.name)) {
|
|
@@ -22,7 +22,7 @@ async function sanitizeRecord (record = {}, opts = {}) {
|
|
|
22
22
|
if (!newFields.includes('id')) newFields.unshift('id')
|
|
23
23
|
newFields = without(newFields, ...allHidden)
|
|
24
24
|
const body = fillObject(record, newFields, null)
|
|
25
|
-
const newRecord = await this.sanitizeBody({ body, partial: true, noDefault: true })
|
|
25
|
+
const newRecord = await this.sanitizeBody({ body, partial: true, noDefault: true, allProps: true })
|
|
26
26
|
if (record._ref) newRecord._ref = cloneDeep(record._ref)
|
|
27
27
|
for (const key in newRecord) {
|
|
28
28
|
const prop = this.getProperty(key)
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
- [2.30.5] Bug fix in ```model.sanitizeBody()```
|
|
6
6
|
- [2.30.5] Bug fix in ```model.sanitizeRecord()```
|
|
7
7
|
- [2.30.6] Bug fix in ```driver.sanitizeRecord()```
|
|
8
|
+
- [2.30.7] Bug fix in ```util.getRefs()```
|
|
9
|
+
- [2.30.7] Bug fix in ```model.sanitizeBody()```
|
|
10
|
+
- [2.30.7] Bug fix in ```model.sanitizeRecord()```
|
|
8
11
|
|
|
9
12
|
## 2026-06-16
|
|
10
13
|
|