Fix Exception in callback of async function: TypeError: this._now is not a function.

Thanks to xet7 !
pull/4903/head
Lauri Ojansivu 2 years ago
parent 5034c957ba
commit aeb0f1e6d8
  1. 1
      models/attachments.js

@ -95,6 +95,7 @@ Attachments = new FilesCollection({
fileObj.versions[versionName].storage = STORAGE_NAME_FILESYSTEM;
});
this._now = new Date();
Attachments.update({ _id: fileObj._id }, { $set: { "versions" : fileObj.versions } });
Attachments.update({ _id: fileObj.uploadedAtOstrio }, { $set: { "uploadedAtOstrio" : this._now() } });

Loading…
Cancel
Save