[openstreetmap/openstreetmap-website] Fix GPX import mailers, which expected different tag objects (PR #7060)

Pablo Brasero notifications at github.com
Tue May 5 13:39:18 UTC 2026


Fixes the issue reported at https://github.com/openstreetmap/openstreetmap-website/pull/6939#issuecomment-4378657196

The problem is that the mailers for GPX import success and failure have different expectations on the format of the tag list:

- `gpx_success` expects the tags to be in DB and be available as `Tracetag` instances, associated to the given `Trace`.
- `gpx_failure` doesn't have anything in DB to go by. It receives details of the failed trace in explicit arguments `trace_name`, `trace_description`, `trace_tags`. This last one is just a list of strings, not ActiveRecord objects.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/7060

-- Commit Summary --

  * Fix GPX import mailers, which expected different tag objects

-- File Changes --

    M app/mailers/user_mailer.rb (2)
    M app/views/user_mailer/_gpx_details.html.erb (2)
    M app/views/user_mailer/_gpx_details.text.erb (2)
    M test/mailers/previews/user_mailer_preview.rb (6)
    M test/mailers/user_mailer_test.rb (13)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/7060.patchhttps://github.com/openstreetmap/openstreetmap-website/pull/7060.diff
-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7060
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7060 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260505/b06fe9dd/attachment.htm>


More information about the rails-dev mailing list