[Git][noosfero/noosfero][master] Revert "return distinct elements in by_enterprise scope"

Antonio Terceiro gitlab at mg.gitlab.com
Tue Dec 8 12:23:09 BRST 2015


Antonio Terceiro pushed to branch master at Noosfero / noosfero


Commits:
13870552 by Antonio Terceiro at 2015-12-08T12:15:59Z
Revert "return distinct elements in by_enterprise scope"

This reverts commit 3057b70bfe7e25e4dee80cae10c408238f040a02, which
caused several tests to fail.

- - - - -


1 changed file:

- app/models/product_category.rb


Changes:

=====================================
app/models/product_category.rb
=====================================
--- a/app/models/product_category.rb
+++ b/app/models/product_category.rb
@@ -7,7 +7,7 @@ class ProductCategory < Category
 
   scope :unique, :select => 'DISTINCT ON (path) categories.*'
   scope :by_enterprise, -> enterprise {
-    distinct.joins(:products).
+    joins(:products).
     where('products.profile_id = ?', enterprise.id)
   }
   scope :by_environment, -> environment {



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/138705521439fee653aa138cf2af3c05081a4cfb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20151208/241336aa/attachment.html>


More information about the Noosfero-dev mailing list