Skip to content

Commit e8f4c32

Browse files
committed
fix: read_only fields in ES
1 parent 7b4e951 commit e8f4c32

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/backend/src/om/entitystorage/ValidationES.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ class ValidationES extends BaseES {
4141
console.log('OLD ENT', extra.old_entity);
4242

4343
for ( const prop of Object.values(this.om.properties) ) {
44-
if ( prop.descriptor.protected ) {
44+
if (
45+
prop.descriptor.protected ||
46+
prop.descriptor.read_only
47+
) {
4548
await entity.del(prop.name);
4649
}
4750
}

src/backend/src/om/mappings/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ module.exports = {
142142
// SYSTEM
143143
godmode: {
144144
type: 'flag',
145-
protected: true,
145+
read_only: true,
146146
},
147147
}
148148
}

0 commit comments

Comments
 (0)