Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion aikido_zen/context/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ def __reduce__(self):

def set_as_current_context(self):
"""
Set the current context
Set the current context, called every time we change the context.
"""
self.reset_cache()
current_context.set(self)

def set_cookies(self, cookies):
Expand All @@ -112,6 +113,9 @@ def set_body(self, body):
except Exception as e:
logger.debug("Exception occurred whilst setting body: %s", e)

def reset_cache(self):
self.parsed_userinput = {}

def set_body_internal(self, body):
"""Sets the body and checks if it's possibly JSON"""
self.body = body
Expand Down
Loading