Move every CustomFields.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)

This commit is contained in:
Martin Filser 2023-02-22 23:02:31 +01:00
parent 47c70f03a2
commit 981a641bce
6 changed files with 11 additions and 10 deletions

View file

@ -648,7 +648,7 @@ Boards.helpers({
// copy custom field definitions
const cfMap = {};
CustomFields.find({ boardIds: oldId }).forEach(cf => {
ReactiveCache.getCustomFields({ boardIds: oldId }).forEach(cf => {
const id = cf._id;
delete cf._id;
cf.boardIds = [_id];
@ -966,10 +966,11 @@ Boards.helpers({
},
customFields() {
return CustomFields.find(
const ret = ReactiveCache.getCustomFields(
{ boardIds: { $in: [this._id] } },
{ sort: { name: 1 } },
);
return ret;
},
// XXX currently mutations return no value so we have an issue when using addLabel in import