]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/api/changesets/_changeset.builder
Merge pull request #3491 from tomhughes/legacy-trace
[rails.git] / app / views / api / changesets / _changeset.builder
index 47c494d9bb3401409498ed7fb35830f7ae477303..e0188a10e0914b5e9dd66fbd756c8a426df38e2f 100644 (file)
@@ -3,11 +3,11 @@
 attrs = {
   "id" => changeset.id,
   "created_at" => changeset.created_at.xmlschema,
-  "open" => changeset.is_open?,
+  "open" => changeset.open?,
   "comments_count" => changeset.comments.length,
   "changes_count" => changeset.num_changes
 }
-attrs["closed_at"] = changeset.closed_at unless changeset.is_open?
+attrs["closed_at"] = changeset.closed_at.xmlschema unless changeset.open?
 changeset.bbox.to_unscaled.add_bounds_to(attrs, "_") if changeset.bbox.complete?
 
 # user attributes