Project

General

Profile

Actions

Bug #7765

closed

[regression] - Backend crash

Added by Olivier Bitsch 26 days ago. Updated 26 days ago.

Status:
Done
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
10/28/2024
Due date:
% Done:

0%

Estimated time:

Description

Crash when we have guest and patient in same time

Oct 28 09:27:14 hcw-athome-dev node[113178]: /usr/share/hcw-athome/backend/api/models/Consultation.js:532
Oct 28 09:27:14 hcw-athome-dev node[113178]:       match = [{ guest: ObjectId(user.id) }];
Oct 28 09:27:14 hcw-athome-dev node[113178]:                         ^
Oct 28 09:27:14 hcw-athome-dev node[113178]: TypeError: Class constructor ObjectId cannot be invoked without 'new'
Oct 28 09:27:14 hcw-athome-dev node[113178]:     at newConstructor.getUserConsultationsFilter (/usr/share/hcw-athome/backend/api/models/Consultation.js:532:25)
Oct 28 09:27:14 hcw-athome-dev node[113178]:     at newConstructor.changeOnlineStatus (/usr/share/hcw-athome/backend/api/models/Consultation.js:576:38)
Oct 28 09:27:14 hcw-athome-dev node[113178]:     at /usr/share/hcw-athome/backend/api/controllers/SubscribeToSocketController.js:33:26
Oct 28 09:27:14 hcw-athome-dev node[113178]:     at Object.joinRoom [as join] (/usr/share/hcw-athome/backend/node_modules/sails-hook-sockets/lib/sails.sockets/join-room.js:52:5)
Oct 28 09:27:14 hcw-athome-dev node[113178]:     at Object.subscribe [as subscribetosocket/subscribe] (/usr/share/hcw-athome/backend/api/controllers/SubscribeToSocketController.js:32:19)
Oct 28 09:27:14 hcw-athome-dev node[113178]:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Oct 28 09:27:14 hcw-athome-dev node[113178]: Node.js v18.17.1
Actions

Also available in: Atom PDF