X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9c0582f88fd2ef4e20c6eb922bcd4cb1a04258d5..7fc83c880ab8ac6e3f6a8778ee7bc65a066670e3:/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 e0188a10e..08cfbbc79 100644 --- a/app/views/api/changesets/_changeset.xml.builder +++ b/app/views/api/changesets/_changeset.xml.builder @@ -24,11 +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 = { - "date" => comment.created_at.xmlschema + "id" => comment.id, + "date" => comment.created_at.xmlschema, + "visible" => comment.visible } if comment.author.data_public? cattrs["uid"] = comment.author.id