Skip to content

Commit

Permalink
Stacktracte when using format_time with a None value
Browse files Browse the repository at this point in the history
When using format_time with a None value then it is throwing a TypeError
not a ValueError which is not handled and the template engine will stop
and print a stacktrace instead.
  • Loading branch information
nichtsfrei committed Mar 29, 2021
1 parent dc446c0 commit 5af7182
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Fixed
- when the max severity amount is smaller then the orientation marker it does not make sense to round up [184](https://github.com/greenbone/pheme/pull/184)
- when there is None value for format_time []()

[Unreleased]: https://github.com/greenbone/pheme/compare/v21.04-rc4...HEAD

Expand Down
1 change: 1 addition & 0 deletions tests/test_format_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def test_format_time_within_template():
{% load readable_timeformat %}
<html>
{{ start | format_time }}
{{ unknown_key | format_time }}
</html>
"""
response = client.put(
Expand Down

0 comments on commit 5af7182

Please sign in to comment.