mirror of
https://github.com/wekan/wekan.git
synced 2026-03-07 06:10:15 +01:00
Merge pull request #6173 from harryadel/fix-filescollection-findOneAsync
Fix FilesCollection findOneAsync errors for Avatars and Attachments
This commit is contained in:
commit
3454ab0278
1 changed files with 2 additions and 2 deletions
|
|
@ -105,7 +105,7 @@ ReactiveCacheServer = {
|
|||
},
|
||||
async getAttachment(idOrFirstObjectSelector = {}, options = {}) {
|
||||
// Try new structure first
|
||||
let ret = await Attachments.findOneAsync(idOrFirstObjectSelector, options);
|
||||
let ret = Attachments.findOne(idOrFirstObjectSelector, options);
|
||||
if (!ret && typeof idOrFirstObjectSelector === 'string') {
|
||||
// Fall back to old structure for single attachment lookup
|
||||
ret = await Attachments.getAttachmentWithBackwardCompatibility(
|
||||
|
|
@ -127,7 +127,7 @@ ReactiveCacheServer = {
|
|||
return ret;
|
||||
},
|
||||
async getAvatar(idOrFirstObjectSelector = {}, options = {}) {
|
||||
const ret = await Avatars.findOneAsync(idOrFirstObjectSelector, options);
|
||||
const ret = Avatars.findOne(idOrFirstObjectSelector, options);
|
||||
return ret;
|
||||
},
|
||||
async getAvatars(selector = {}, options = {}, getQuery = false) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue