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

extract.py: fix list block for empty lists #545

Merged
merged 2 commits into from
Mar 19, 2022

Conversation

mb03
Copy link

@mb03 mb03 commented Mar 18, 2022

In case there is a listblock with no elements, by accident or design, the current code would raise an error.
This fix solves the case of empty list.

@zerolab
Copy link
Collaborator

zerolab commented Mar 18, 2022

Nice catch, @mb03
Can you please lint the code and add a test for this too?

You can see #510 or #525 for examples of tests for it

@zerolab zerolab added this to the v1.1.1 milestone Mar 18, 2022
@mb03
Copy link
Author

mb03 commented Mar 19, 2022

Linted and added a test

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2022

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.25%. Comparing base (af6746d) to head (ce9a627).
Report is 295 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #545      +/-   ##
==========================================
+ Coverage   91.22%   91.25%   +0.03%     
==========================================
  Files          37       37              
  Lines        3235     3235              
  Branches      522      522              
==========================================
+ Hits         2951     2952       +1     
  Misses        163      163              
+ Partials      121      120       -1     

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

@zerolab zerolab merged commit 1294c71 into wagtail:main Mar 19, 2022
@zerolab
Copy link
Collaborator

zerolab commented Mar 19, 2022

Merged, thank you

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.

3 participants