Tierpricing for users removed from tier groups at runtime

Issue #1358 resolved
Hynek Cernoch created an issue

If a user who have displayed any price since server startup is added to tier group or removed from it, these changes are not reflected until server (process) restart.

This is due to threadlocals.

Comments (2)

  1. Hynek Cernoch reporter

    To reproduce it:

    • apply a patch with a new test 955c1474654f
    • python manage.py test tieredpricing

    Fix 2332dcb13165

    The fix as based on listening the changes a clearing the value which are cached in threadlocals for that changed user.

    This bug was the reason for a well known bug why the complete test failed on test_tiered_user and test_tieredprice whereas partial test "test tieredprice" was ok.

    Other fixed bug

    There was also an unknown bug in test_simple_tier, which could be demonstrated by

    python manage.py test wishlist.WishTestLoggedIn.test_wish_removing tieredpricing
    

    but in complete test it was hidden. It was also related to threadlocals storage.

  2. Log in to comment