Skip to content

Commit

Permalink
Make BoxBlock.title a non-required field
Browse files Browse the repository at this point in the history
  • Loading branch information
chigby committed Feb 9, 2024
1 parent 368ba3b commit 097b40f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions newamericadotorg/templates/blocks/box.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{% load wagtailcore_tags %}
{% load cited_html %}
<div class="block-box">
{% if value.title %}
<h5>→&nbsp;{{value.title}}</h5>
{% endif %}
{% for block in value.body %}
{% if block.block_type == 'paragraph' %}
<div class="block-{{ block.block_type }}">
Expand Down
2 changes: 1 addition & 1 deletion report/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class BoxBody(blocks.StreamBlock):


class BoxBlock(blocks.StructBlock):
title = blocks.TextBlock()
title = blocks.TextBlock(required=False)
body = BoxBody()

class Meta:
Expand Down

0 comments on commit 097b40f

Please sign in to comment.