Fixed a bug with Polls deletion from all meetings

Which happened when we published a poll, cleared a collection, and then received a poll_stopped_message
This commit is contained in:
Oleksandr Zhurbenko 2016-06-27 11:30:37 -07:00
parent 8b4747a89d
commit 3d0132685f

View File

@ -6,10 +6,7 @@ export function clearPollCollection() {
const pollId = arguments[1];
//TODO make it so you can delete the polls based only on meetingId
if (meetingId != null && pollId != null && Polls.findOne({
meetingId: meetingId,
poll: { id: pollId },
}) != null) {
if (meetingId != null && pollId != null) {
return Polls.remove({
meetingId: meetingId,
'poll.id': pollId,