Skip to content

Commit

Permalink
Render empty float blocks as blank
Browse files Browse the repository at this point in the history
  • Loading branch information
mgax committed Apr 3, 2024
1 parent 3798590 commit a357268
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ietf/templates/blocks/float_block.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% if value is not None %}{{ value }}{% endif %}
2 changes: 1 addition & 1 deletion ietf/utils/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class StandardBlock(StreamBlock):
typed_table = TypedTableBlock(
[
("text", CharBlock(required=False)),
("numeric", FloatBlock(required=False)),
("numeric", FloatBlock(required=False, template="blocks/float_block.html")),
("rich_text", RichTextBlock(required=False)),
("image", ImageChooserBlock(required=False)),
]
Expand Down

0 comments on commit a357268

Please sign in to comment.