[openstreetmap/openstreetmap-website] Don't update deactivates_at if block was already viewed (PR #5312)
Anton Khorev
notifications at github.com
Mon Nov 11 15:04:44 UTC 2024
When a blocked user visits their block page, its deactivation time is recorded. Problem is this only needs to happen if there's no deactivation time set. If it's already set, it should be kept at what it is.
The possible bug is that if the user visits their block page after the block is lifted, that visit time gets into `deactivates_at` and is reported as the block end time despite the block ending earlier.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5312
-- Commit Summary --
* Don't update deactivates_at if block was already viewed
-- File Changes --
M app/controllers/user_blocks_controller.rb (2)
M test/controllers/user_blocks_controller_test.rb (70)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5312.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5312.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5312
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5312 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241111/54d47081/attachment.htm>
More information about the rails-dev
mailing list