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

Added replace_blanks filter for templates #525

Merged
merged 8 commits into from
Sep 25, 2024

Conversation

chrismaddalena
Copy link
Collaborator

This adds a replace_blanks Jinja2 filter that accepts a list of dictionaries to replace null values with a placeholder value (" as the default). This is useful when trying to sort or access values that could be empty in Ghostwriter's report context a custom JSON field value. This is in response to #524.

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.83%. Comparing base (1137f9d) to head (525ba79).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #525   +/-   ##
=======================================
  Coverage   91.83%   91.83%           
=======================================
  Files         319      319           
  Lines       18533    18539    +6     
=======================================
+ Hits        17019    17025    +6     
  Misses       1514     1514           

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

@chrismaddalena chrismaddalena added release Ready for a release in progress On the road map and being actively worked labels Sep 25, 2024
@chrismaddalena chrismaddalena changed the base branch from master to staging September 25, 2024 20:52
@chrismaddalena chrismaddalena merged commit ec0293b into staging Sep 25, 2024
@chrismaddalena chrismaddalena deleted the hotfix/replace-blanks-filter branch September 30, 2024 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress On the road map and being actively worked release Ready for a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant