Skip to content
Merged
Changes from all commits
Commits
File filter

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 django_unicorn/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@ def _process_component_request(
request=request,
)

# This shouldn't happen, but is a fail-safe to make sure that there is always a request on the component
# Make sure that there is always a request on the component if needed
if component.request is None:
component.request = request

# Make sure that there is always a request on the parent if needed
if component.parent is not None and component.parent.request is None:
component.parent.request = request

# Get a deepcopy of the data passed in to determine what fields are updated later
original_data = copy.deepcopy(component_request.data)

Expand Down