Skip to content

Commit

Permalink
Fix - Replace attribute call with key (#40)
Browse files Browse the repository at this point in the history
Context does not always have attribute 'request' when context has been
modified previously.
  • Loading branch information
0RWilliams authored May 10, 2024
1 parent 3946bc8 commit 1795d46
Show file tree
Hide file tree
Showing 3 changed files with 330 additions and 292 deletions.
2 changes: 1 addition & 1 deletion django_feedback_govuk/templatetags/feedback_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def feedback_submit(context, form_id: str = DEFAULT_FEEDBACK_ID, initial=None):
else:
if not initial:
initial = {}
initial.update(submitter=context.request.user)
initial.update(submitter=context["request"].user)

form = feedback_form(initial=initial)

Expand Down
Loading

0 comments on commit 1795d46

Please sign in to comment.