fix import

This commit is contained in:
azivner
2018-11-26 22:22:16 +01:00
parent 4d5a17583f
commit 56e2b44c25
4 changed files with 45 additions and 21 deletions

View File

@@ -327,11 +327,11 @@ eventService.subscribe(eventService.ENTITY_CHANGED, async ({entityName, entity})
if (attribute.type === 'label' && attribute.name === 'archived') {
// we're not using label object directly, since there might be other non-deleted archived label
const hideLabel = await repository.getEntity(`SELECT * FROM attributes WHERE isDeleted = 0 AND type = 'label'
const archivedLabel = await repository.getEntity(`SELECT * FROM attributes WHERE isDeleted = 0 AND type = 'label'
AND name = 'archived' AND noteId = ?`, [attribute.noteId]);
if (hideLabel) {
archived[attribute.noteId] = hideLabel.isInheritable ? 1 : 0;
if (archivedLabel) {
archived[attribute.noteId] = archivedLabel.isInheritable ? 1 : 0;
}
else {
delete archived[attribute.noteId];