79118874

Date: 2024-10-23 16:42:31
Score: 1.5
Natty:
Report link

In this case, I was inadvertently preserving the state of prior calls in properties of the class, e.g., self.filtered_items, which is a python list. I am using Flask for the front end, and it evidently is preserving the state of the class I use to retrieve the data between requests from the web browser. To solve this problem, I am just emptying the list in the property before it repopulates: self.filtered_items = [].

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Andre Hulet