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 119 root 'communities', 'community'
120 120 expose :description
121 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 123 end
124 124 expose :categories, :using => Category
125 125 expose :members, :using => Person
... ...
plugins/organization_ratings/db/migrate/20151203121430_destroy_rejected_reports.rb
... ... @@ -5,7 +5,9 @@ class DestroyRejectedReports < ActiveRecord::Migration
5 5 settings = YAML.load(task['data'])
6 6 comments << settings[:organization_rating_comment_id]
7 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 11 end
10 12  
11 13 def down
... ...