From 48270f39010baaabf28ef26c238c35fe34516236 Mon Sep 17 00:00:00 2001 From: geoffreychen777 Date: Mon, 29 Jan 2024 19:22:48 +0000 Subject: [PATCH] fix partition bug --- app/repositories/db-repository/categorizer-repository.ts | 4 ++-- app/repositories/db-repository/smartfilter-repository.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/repositories/db-repository/categorizer-repository.ts b/app/repositories/db-repository/categorizer-repository.ts index 3773bdda..37c88a16 100644 --- a/app/repositories/db-repository/categorizer-repository.ts +++ b/app/repositories/db-repository/categorizer-repository.ts @@ -313,10 +313,10 @@ export class CategorizerRepository extends Eventable(type, categorizer); if (partition) { - newObject._partition = partition; + categorizer._partition = partition; } + const newObject = realm.create(type, categorizer); if (parentObject) { // concat parent name if ( diff --git a/app/repositories/db-repository/smartfilter-repository.ts b/app/repositories/db-repository/smartfilter-repository.ts index 2d93b145..21995a59 100644 --- a/app/repositories/db-repository/smartfilter-repository.ts +++ b/app/repositories/db-repository/smartfilter-repository.ts @@ -239,10 +239,10 @@ export class PaperSmartFilterRepository extends Eventable(type, smartfilter); if (partition) { - newObject._partition = partition; + smartfilter._partition = partition; } + const newObject = realm.create(type, smartfilter); if (parentObject) { // concat parent name if (parentObject.name && parentObject.name !== "SmartFilters") {