Move every Swimlanes.findOne(idOrFirstObjectSelector, options) to the ReactiveCache

This commit is contained in:
Martin Filser 2023-02-04 12:32:18 +01:00
parent 0767f50af8
commit 48ba81eb3d
6 changed files with 17 additions and 17 deletions

View file

@ -783,7 +783,7 @@ Boards.helpers({
},
nextSwimlane(swimlane) {
return Swimlanes.findOne(
return ReactiveCache.getSwimlane(
{
boardId: this._id,
archived: false,
@ -1193,13 +1193,13 @@ Boards.helpers({
},
getDefaultSwimline() {
let result = Swimlanes.findOne({ boardId: this._id });
let result = ReactiveCache.getSwimlane({ boardId: this._id });
if (result === undefined) {
Swimlanes.insert({
title: TAPi18n.__('default'),
boardId: this._id,
});
result = Swimlanes.findOne({ boardId: this._id });
result = ReactiveCache.getSwimlane({ boardId: this._id });
}
return result;
},