Skip to content

Commit

Permalink
Merge branch 'dev' into release/2
Browse files Browse the repository at this point in the history
  • Loading branch information
vsalvino committed May 10, 2023
2 parents 988d755 + 2983127 commit e9a27fc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
5 changes: 4 additions & 1 deletion coderedcms/blocks/base_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def to_python(self, value):
Convert the serialized value back into a python object.
"""
if isinstance(value, int):
return self.target_model.objects.get(pk=value)
try:
return self.target_model.objects.get(pk=value)
except self.target_model.DoesNotExist:
return None
return value

def get_prep_value(self, value):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% if group %}
<div class="field-col col4">
<ul class="crx-checkbox-group">
<li><label>{{ group }}</label>
<li><label class="w-field__label">{{ group }}</label>
{% endif %}
<ul {% if id %}id="{{ id }}_{{ index }}"{% endif %}>
{% for option in options %}
Expand All @@ -18,9 +18,10 @@
</div>
{% endif %}
{% if forloop.counter|divisibleby:3 %}
<div class="clearfix"></div>
<div style="clear:both;"></div>
{% endif %}
{% endfor %}
<div style="clear:both;"></div>
</div>
{% endwith %}
{% else %}
Expand Down
1 change: 1 addition & 0 deletions docs/releases/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Supported Versions:
.. toctree::
:maxdepth: 1

v2.1.2
v2.1.1
v2.1.0
v2.0.0
Expand Down
8 changes: 8 additions & 0 deletions docs/releases/v2.1.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
v2.1.2 release notes
====================

Bug fixes:

* Instead of throwing a server error, return None if "Latest Pages" block has invalid (i.e. deleted) classifier term.

* Fix display issue with classifier terms in Wagtail Admin when editing a page.

0 comments on commit e9a27fc

Please sign in to comment.