[openstreetmap/openstreetmap-website] Trace import: remove activerecord-import gem (PR #5038)
mmd
notifications at github.com
Sun Aug 4 13:48:54 UTC 2024
@mmd-osm commented on this pull request.
> tracepoints.each do |tp|
tp.run_callbacks(:save) { false }
tp.run_callbacks(:create) { false }
end
- Tracepoint.import!(tracepoints)
+ Tracepoint.insert_all!(tracepoints.map(&:attributes))
Good idea, I've added some unit tests for the API endpoint. It's a bit unfortunate though, that lat/lon values are identical in `a.gpx`.
I've also added a call to `validate!`. I'm not sure if this whole validation is working as expected. Like before, I'm getting import failures in case the timestamp is missing, which is good. However, missing lat/lon values are not reported neither in the current code nor in the updated version in this PR.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5038#discussion_r1703210313
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5038/review/2217755492 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240804/a6e90b46/attachment.htm>
More information about the rails-dev
mailing list