Return a space inside a bracket if the text was empty.
- Legacy-Id: 634
This commit is contained in:
parent
8302413637
commit
9dad4b8a75
|
@ -96,6 +96,8 @@ def format_textarea(value):
|
|||
def square_brackets(value):
|
||||
"""Adds square brackets around text."""
|
||||
if type(value) == type(""):
|
||||
if value == "":
|
||||
value = " "
|
||||
return "[ %s ]" % value
|
||||
elif value > 0:
|
||||
return "[ X ]"
|
||||
|
|
Loading…
Reference in a new issue