@autofleet/shtinker 1.1.6-beta.24 → 1.1.6-beta.26
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.
- package/dist/audit-logger.js +2 -4
- package/package.json +1 -1
- package/src/audit-logger.ts +2 -4
package/dist/audit-logger.js
CHANGED
|
@@ -37,10 +37,8 @@ const filterOutEmptyFields = (fields, instance) => fields.filter((field) => !isE
|
|
|
37
37
|
const getChangedFields = (instance, options) => {
|
|
38
38
|
// When bulk updating in sequelize using the "returning" option, the instance.changed() stops working.
|
|
39
39
|
// It's a known issut with sequelize.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
return instance.changed();
|
|
40
|
+
const changedProperties = options.returning ? options.fields : instance.changed();
|
|
41
|
+
return filterOutEmptyFields(changedProperties, instance);
|
|
44
42
|
};
|
|
45
43
|
class AuditLogger {
|
|
46
44
|
constructor(options) {
|
package/package.json
CHANGED
package/src/audit-logger.ts
CHANGED
|
@@ -30,10 +30,8 @@ const filterOutEmptyFields = (fields, instance) => fields.filter((field) => !isE
|
|
|
30
30
|
const getChangedFields = (instance, options) => {
|
|
31
31
|
// When bulk updating in sequelize using the "returning" option, the instance.changed() stops working.
|
|
32
32
|
// It's a known issut with sequelize.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
return instance.changed();
|
|
33
|
+
const changedProperties = options.returning ? options.fields : instance.changed();
|
|
34
|
+
return filterOutEmptyFields(changedProperties, instance);
|
|
37
35
|
};
|
|
38
36
|
|
|
39
37
|
class AuditLogger {
|