Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonSharratt committed Feb 7, 2020
1 parent bcdf634 commit 66300c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions microservices/forumApi/db/model/topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ model.getAll = function(query, limit, page, user, callback){
$expr: {
$and: [
{$or: [
{$eq: [ { if: {$eq: ["$topic_id", "*"] }, then: "*", else: {$toObjectId: "$topic_id"} }, "$$topicId"] },
{$eq: [ { if: {$eq: ["$topic_id", "*"] }, then: "*", else: {$toObjectId: "$topic_id"} }, "$$parent"] },
{$eq: [{ $convert: { input: "$topic_id", to: "objectId", onError: "1" } }, "$$topicId"] },
{$eq: [{ $convert: { input: "$topic_id", to: "objectId", onError: "1" } }, "$$parent"] },
{$eq: ["$topic_id", "*"] }
]},
{$eq: ["$allow", true]}
Expand Down

0 comments on commit 66300c3

Please sign in to comment.