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/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to