Skip to content

Commit

Permalink
fix partition bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyChen777 committed Jan 29, 2024
1 parent 55bee6f commit 48270f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/repositories/db-repository/categorizer-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ export class CategorizerRepository extends Eventable<ICategorizerRepositoryState
parentObject = this.toRealmObject(realm, type, parent);
}

const newObject = realm.create<Categorizer>(type, categorizer);
if (partition) {
newObject._partition = partition;
categorizer._partition = partition;
}
const newObject = realm.create<Categorizer>(type, categorizer);
if (parentObject) {
// concat parent name
if (
Expand Down
4 changes: 2 additions & 2 deletions app/repositories/db-repository/smartfilter-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ export class PaperSmartFilterRepository extends Eventable<ISmartFilterServiceSta
parentObject = this.toRealmObject(realm, parent);
}

const newObject = realm.create<PaperSmartFilter>(type, smartfilter);
if (partition) {
newObject._partition = partition;
smartfilter._partition = partition;
}
const newObject = realm.create<PaperSmartFilter>(type, smartfilter);
if (parentObject) {
// concat parent name
if (parentObject.name && parentObject.name !== "SmartFilters") {
Expand Down

0 comments on commit 48270f3

Please sign in to comment.