Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HistoryRequestMiddleware doesn't clean up after itself under some circumstances #1189

Closed
manelclos opened this issue Jun 12, 2023 · 0 comments · Fixed by #1188
Closed

HistoryRequestMiddleware doesn't clean up after itself under some circumstances #1189

manelclos opened this issue Jun 12, 2023 · 0 comments · Fixed by #1188

Comments

@manelclos
Copy link
Member

Describe the bug
We caught a problem were the request was reuse, causing a strange random behaviour.

To Reproduce
Steps to reproduce the behavior:

  • a test makes a request, so the context is updated
  • an exception happens and process_response is never called, context still contains WRONG request
  • the next test creates some versioned model, and the WRONG request is used

Expected behavior
Simple history not using the previous request.

Environment (please complete the following information):

  • OS: [docker python:3.8 image]
  • Django Simple History Version: 3.3.0
  • Django Version: 2.2.
  • Database Version: MySQL 8.0

Pull request here: #1188

Will complete the checklist if you think this should go in.

@ddabble ddabble changed the title Simple history can use the previous request is some circunstances HistoryRequestMiddleware doesn't clean up after itself under some circumstances Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant