Commit 5b4c38f78cbeccb24cb3f4bcec7587d4ea3686f1
1 parent
33871f09
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
return uniq values
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/models/profile.rb
| ... | ... | @@ -139,7 +139,7 @@ class Profile < ActiveRecord::Base |
| 139 | 139 | .where( |
| 140 | 140 | ['( ( role_assignments.accessor_type = ? AND role_assignments.accessor_id = ? ) OR |
| 141 | 141 | (profiles.public_profile = ?) )', Profile.name, person.id, true] |
| 142 | - ) | |
| 142 | + ).uniq | |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | # Subclasses must override this method | ... | ... |
test/unit/api/communities_test.rb
| ... | ... | @@ -43,7 +43,7 @@ class CommunitiesTest < ActiveSupport::TestCase |
| 43 | 43 | should 'list private community for members' do |
| 44 | 44 | c1 = fast_create(Community) |
| 45 | 45 | c2 = fast_create(Community, :public_profile => false) |
| 46 | - c1.add_member(person) | |
| 46 | + c2.add_member(person) | |
| 47 | 47 | |
| 48 | 48 | get "/api/v1/communities?#{params.to_query}" |
| 49 | 49 | json = JSON.parse(last_response.body) | ... | ... |