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

Remove context None guard exception #30

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tbrlpld
Copy link
Owner

@tbrlpld tbrlpld commented Mar 5, 2024

Description

Checklist

  • CHANGELOG.md has been updated.
  • README.md has been updated.
  • Checked compatibility with Wagtail.
  • Self code reviewed.

@tbrlpld tbrlpld changed the title Remove context None guard error Remove context None guard exception Mar 5, 2024
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (bd265d4) to head (7c1b85d).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #30   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          254       252    -2     
=========================================
- Hits           254       252    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

`None` was returned from `get_context_method`.

I was not able to find out why this check was put in place. The components usage
in Wagtail does not reveal any issues when the error is removed. Also, the
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in Wagtail does not reveal any issues when the error is removed. Also, the
in Wagtail does not reveal any issues when the error guard is removed.
Also, the


I was not able to find out why this check was put in place. The components usage
in Wagtail does not reveal any issues when the error is removed. Also, the
following template rendering works just fine with the context being `None`.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
following template rendering works just fine with the context being `None`.
template rendering with `template.render(context)` works just fine with the context being `None`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant