Skip to content

Commit

Permalink
Merge pull request #5 from SuffolkLITLab/addresses_not_iterable
Browse files Browse the repository at this point in the history
Won't fail if `addresses_to_search` isn't iterable
  • Loading branch information
BryceStevenWilley authored Nov 18, 2021
2 parents e23cca0 + 81bf1f3 commit c57b125
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
modules:
- docassemble.MACourts.macourts
- collections.abc
---
objects:
- trial_court: MACourt
Expand Down Expand Up @@ -150,7 +151,12 @@ subquestion: |
% if len(all_matches) > 0:
Below is a map of the court(s) that serve
the address you gave us, ${comma_and_list([address.on_one_line() for address in addresses_to_search],comma_string='; ')}.
the address you gave us,
% if isinstance(addresses_to_search, Iterable):
${comma_and_list([address.on_one_line() for address in addresses_to_search],comma_string='; ')}.
% else:
${addresses_to_search.on_one_line()}
% endif
${map_of(combined_locations(all_matches))}
% endif
Expand Down

0 comments on commit c57b125

Please sign in to comment.