Blocks table update in #4200 was done before `deactivates_at` was introduced. Because of that there's still code that checks `updated_at` instead of `deactivates_at`.
This PR fixes a bug which should be difficult to notice because it happens only with zero-duration blocks that don't need to be viewed. Usually it doesn't make sense to create such blocks. These blocks are incorrectly reported as "read" in the table even if they weren't read because `updated_at` is slightly greater than `ends_at`. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5476 -- Commit Summary -- * Check deactivates_at to report if block was read after its end date -- File Changes -- M app/helpers/user_blocks_helper.rb (2) M test/helpers/user_blocks_helper_test.rb (32) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/5476.patch https://github.com/openstreetmap/openstreetmap-website/pull/5476.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5476 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev