Commit 4103c19e50df411f5bd332e43b0de2e6457158e9

Authored by Weblate
2 parents 3eb62a89 a51e24d4

Merge remote-tracking branch 'origin/master'

lib/noosfero/api/entities.rb
@@ -119,7 +119,7 @@ module Noosfero @@ -119,7 +119,7 @@ module Noosfero
119 root 'communities', 'community' 119 root 'communities', 'community'
120 expose :description 120 expose :description
121 expose :admins do |community, options| 121 expose :admins do |community, options|
122 - community.admins.map{|admin| {"name"=>admin.name, "id"=>admin.id}} 122 + community.admins.map{|admin| {"name"=>admin.name, "id"=>admin.id, "username" => admin.identifier}}
123 end 123 end
124 expose :categories, :using => Category 124 expose :categories, :using => Category
125 expose :members, :using => Person 125 expose :members, :using => Person
plugins/organization_ratings/db/migrate/20151203121430_destroy_rejected_reports.rb
@@ -5,7 +5,9 @@ class DestroyRejectedReports < ActiveRecord::Migration @@ -5,7 +5,9 @@ class DestroyRejectedReports < ActiveRecord::Migration
5 settings = YAML.load(task['data']) 5 settings = YAML.load(task['data'])
6 comments << settings[:organization_rating_comment_id] 6 comments << settings[:organization_rating_comment_id]
7 end 7 end
8 - execute("DELETE FROM comments WHERE id IN (#{comments.join(',')})") if comments.present? 8 + if !comments.empty?
  9 + execute("DELETE FROM comments WHERE id IN (#{comments.join(',')})")
  10 + end
9 end 11 end
10 12
11 def down 13 def down