fix renaming existing attributes + added new label autoReadOnlyDisabled to control automatic setting to readOnly mode

This commit is contained in:
zadam
2020-05-06 21:41:14 +02:00
parent 62b993f06f
commit 5d8808a2ad
3 changed files with 33 additions and 28 deletions

View File

@@ -101,7 +101,7 @@ async function updateNoteAttributes(req) {
|| (attribute.type === 'relation' && attribute.value !== attributeEntity.value)) {
if (attribute.type !== 'relation' || !!attribute.value.trim()) {
const newAttribute = attribute.createClone(attribute.type, attribute.name, attribute.value);
const newAttribute = attributeEntity.createClone(attribute.type, attribute.name, attribute.value);
await newAttribute.save();
}
@@ -139,6 +139,7 @@ async function updateNoteAttributes(req) {
}
const note = await repository.getNote(noteId);
note.invalidateAttributeCache();
return await note.getAttributes();
}