Skip to content

Commit f5273e7

Browse files
committed
Revertd default value of boolean in advanced_search_result
1 parent d21fec9 commit f5273e7

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

entry/models.py

-4
Original file line numberDiff line numberDiff line change
@@ -1757,10 +1757,6 @@ def _set_attrinfo(entity_attr, attr, attrv, container, is_recursive=False):
17571757
else False,
17581758
}
17591759

1760-
# default value for boolean attributes is False.
1761-
if entity_attr.type & AttrTypeValue["boolean"]:
1762-
attrinfo["value"] = False
1763-
17641760
def _set_attrinfo_data(model):
17651761
if attrv.value:
17661762
obj = model.objects.filter(id=attrv.value, is_active=True).first()

entry/tests/test_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4501,7 +4501,7 @@ def test_get_es_document_without_attribute_value(self):
45014501
"entry": {"id": entry.id, "name": "entry"},
45024502
"is_readble": True,
45034503
"attrs": {
4504-
"bool": {"is_readble": True, "type": AttrTypeValue["boolean"], "value": False},
4504+
"bool": {"is_readble": True, "type": AttrTypeValue["boolean"], "value": ""},
45054505
"date": {
45064506
"is_readble": True,
45074507
"type": AttrTypeValue["date"],

0 commit comments

Comments
 (0)