mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 09:38:49 +01:00
Move every CustomFields.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)
This commit is contained in:
parent
47c70f03a2
commit
981a641bce
6 changed files with 11 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue