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

Category names that are numbers #151

Merged
merged 4 commits into from
Jan 27, 2022
Merged

Conversation

nickmoreton
Copy link
Collaborator

@nickmoreton nickmoreton commented Jan 27, 2022

Avoid error when category names are numbers

If a category name is 2016 in the XML pulldom will preserve it as an integer type. As we check the length of the name it needs to be a string.

Issue: #148


This adds a new category to test in the XML file for one of the items and passes the name through str() to convert the category name before the length is tested.

  • Testing
    • CI passes
    • If necessary, tests are added for new or fixed behaviour
    • These changes do not reduce test coverage
  • Documentation.
    • Documentation changes are not necessary because: no changes are made to the package operation.

Note this category will be interpreted as an integer by pulldom
@nickmoreton nickmoreton linked an issue Jan 27, 2022 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2022

Codecov Report

Merging #151 (04fae66) into main (3fa1b52) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #151   +/-   ##
=======================================
  Coverage   65.05%   65.05%           
=======================================
  Files          32       32           
  Lines        1265     1265           
  Branches      228      228           
=======================================
  Hits          823      823           
  Misses        400      400           
  Partials       42       42           
Impacted Files Coverage Δ
wagtail_wordpress_import/importers/wordpress.py 84.74% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fa1b52...04fae66. Read the comment docs.

@nickmoreton nickmoreton self-assigned this Jan 27, 2022
Copy link
Collaborator

@nimasmi nimasmi left a comment

Choose a reason for hiding this comment

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

I mostly approve, with two points for discussion.

@nickmoreton
Copy link
Collaborator Author

Thanks!

@nickmoreton nickmoreton merged commit 415d6dc into main Jan 27, 2022
@nickmoreton nickmoreton deleted the fix/148-category-is-integer branch January 27, 2022 17:03
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.

Category plugin crashes if the category is an integer
3 participants