Skip to content

Commit

Permalink
fix(SPT-32187): added error message for record.search (#208)
Browse files Browse the repository at this point in the history
* fix(SPT-32187): added error message for record.search

* feat(SPT-32187): updated exception handler for mutliselect

---------

Co-authored-by: SaiKumar Kondapalli <[email protected]>
  • Loading branch information
saikumarswimlane and SaiKumar Kondapalli authored Sep 25, 2024
1 parent 4d8a713 commit 11f2f63
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion swimlane/core/fields/base/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,19 @@ def get_report(self, value):
"""Return provided field Python value formatted for use in report filter"""
if self.multiselect:
value = value or []
try:
list_vars = vars(value)
if "multiselect" in list_vars:
pass
except :
if not isinstance(value, list) :
raise TypeError("Value Expected a list, but got something else.")
children = []

for child in value:
children.append(self.cast_to_report(child))
id = self.cast_to_report(child)
if id:
children.append(id)

return children

Expand Down

0 comments on commit 11f2f63

Please sign in to comment.