Skip to content

Commit

Permalink
Select products not flagged as deleted (#1489)
Browse files Browse the repository at this point in the history
* Selected products not flagged as deleted

* Select all products not flagged as deleted

* Add nul to second selector
  • Loading branch information
brent-hoover authored and Aaron Judd committed Oct 18, 2016
1 parent 62713b6 commit 594cc84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/publications/collections/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Meteor.publish("Product", function (productId) {

let selector = {};
selector.isVisible = true;
selector.isDeleted = false;
selector.isDeleted = {$in: [null, false]};

if (Roles.userIsInRole(this.userId, ["owner", "admin", "createProduct"],
shop._id)) {
Expand Down Expand Up @@ -51,7 +51,7 @@ Meteor.publish("Product", function (productId) {
// Selector for hih?
selector = {
isVisible: true,
isDeleted: false,
isDeleted: {$in: [null, false]},
$or: [
{ _id: _id },
{
Expand Down
2 changes: 1 addition & 1 deletion server/publications/collections/products.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Meteor.publish("Products", function (productScrollLimit = 24, productFilters, so

if (shop) {
const selector = {
isDeleted: false,
isDeleted: {$in: [null, false]},
ancestors: {
$exists: true,
$eq: []
Expand Down

0 comments on commit 594cc84

Please sign in to comment.