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

generally improve formatting of resource item metadata #6356

Merged

Conversation

paulmueller
Copy link
Contributor

Fixes #6350 and improves handling of numbers in general.

Proposed fixes:

Initially I thought that the issue described in #6350 only affects False booleans, but it also affects all numbers that are 0 (integer and float). This PR makes ckan.lib.helpers.format_resource_items properly format (as in format as a string) numbers. Previously, booleans and zero-valued numbers were not converted to a string. I added a parametrized test function.

Features:

  • includes tests covering changes (as far as I can see there were no tests for that function before)
  • includes updated documentation
  • includes user-visible changes
  • includes API changes
  • includes bugfix for possible backport

Please [X] all the boxes above that apply

@paulmueller
Copy link
Contributor Author

@pdelboca Please let me know if I can do anything to improve this or if you need me to clarify things.

@pdelboca
Copy link
Member

No need @paulmueller ! Looks good to me! Sorry for the delay in reviewing this :)

cc @amercader

@paulmueller
Copy link
Contributor Author

🌷 @amercader please merge

@pdelboca pdelboca merged commit b8a14d2 into ckan:master Mar 2, 2022
@pdelboca
Copy link
Member

pdelboca commented Mar 2, 2022

Thanks for this @paulmueller and sorry it took so long to be merged :)

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.

ckan.lib.helpers.format_resource_items discards False boolean values
2 participants