X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7ac0e897ff008c52e7b2b9d67358dafc01b78111..a0013c8f56d6d0b6eaa707741ac744c8fb9f52cc:/app/views/api/changesets/_changeset.xml.builder?ds=sidebyside diff --git a/app/views/api/changesets/_changeset.xml.builder b/app/views/api/changesets/_changeset.xml.builder index bc4365eb6..08cfbbc79 100644 --- a/app/views/api/changesets/_changeset.xml.builder +++ b/app/views/api/changesets/_changeset.xml.builder @@ -24,12 +24,13 @@ xml.changeset(attrs) do |changeset_xml_node| # include discussion if requested - if @include_discussion + if @comments changeset_xml_node.discussion do |discussion_xml_node| - changeset.comments.includes(:author).each do |comment| + @comments.each do |comment| cattrs = { "id" => comment.id, - "date" => comment.created_at.xmlschema + "date" => comment.created_at.xmlschema, + "visible" => comment.visible } if comment.author.data_public? cattrs["uid"] = comment.author.id