mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Move every CustomFields.findOne(idOrFirstObjectSelector, options) to the ReactiveCache
This commit is contained in:
parent
9e557f6887
commit
806ad78637
3 changed files with 5 additions and 5 deletions
|
@ -372,14 +372,14 @@ class AdvancedFilter {
|
|||
}
|
||||
|
||||
_fieldNameToId(field) {
|
||||
const found = CustomFields.findOne({
|
||||
const found = ReactiveCache.getCustomField({
|
||||
name: field,
|
||||
});
|
||||
return found._id;
|
||||
}
|
||||
|
||||
_fieldValueToId(field, value) {
|
||||
const found = CustomFields.findOne({
|
||||
const found = ReactiveCache.getCustomField({
|
||||
name: field,
|
||||
});
|
||||
if (
|
||||
|
|
|
@ -533,7 +533,7 @@ Cards.helpers({
|
|||
// Map custom fields to new board
|
||||
return this.customFields.map(cf => {
|
||||
const oldCf = ReactiveCache.getCustomField(cf._id);
|
||||
const newCf = CustomFields.findOne({
|
||||
const newCf = ReactiveCache.getCustomField({
|
||||
boardIds: boardId,
|
||||
name: oldCf.name,
|
||||
type: oldCf.type,
|
||||
|
|
|
@ -337,7 +337,7 @@ if (Meteor.isServer) {
|
|||
Authentication.checkBoardAccess(req.userId, paramBoardId);
|
||||
JsonRoutes.sendResult(res, {
|
||||
code: 200,
|
||||
data: CustomFields.findOne({
|
||||
data: ReactiveCache.getCustomField({
|
||||
_id: paramCustomFieldId,
|
||||
boardIds: { $in: [paramBoardId] },
|
||||
}),
|
||||
|
@ -377,7 +377,7 @@ if (Meteor.isServer) {
|
|||
boardIds: [board._id],
|
||||
});
|
||||
|
||||
const customField = CustomFields.findOne({
|
||||
const customField = ReactiveCache.getCustomField({
|
||||
_id: id,
|
||||
boardIds: { $in: [paramBoardId] },
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue