Skip to content

Commit

Permalink
Handle get_court fails and no party_type_exclude
Browse files Browse the repository at this point in the history
One from request of ILAO, one from a production error.
  • Loading branch information
BryceStevenWilley committed Dec 20, 2023
1 parent 135251a commit 8ddce5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docassemble/EFSPIntegration/data/questions/case_search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ only sets:
- x.can_file_non_indexed_case
generic object: EFCaseSearch
code: |
x.court_code_results = proxy_conn.get_court(x.court_id).data
if x.court_code_results:
x.can_file_non_indexed_case = x.court_code_results.get('allowfilingintononindexedcase', False)
x.court_code_results = proxy_conn.get_court(x.court_id)
if x.court_code_results and x.court_code_results.is_ok():
x.can_file_non_indexed_case = x.court_code_results.data.get('allowfilingintononindexedcase', False)
else:
x.can_file_non_indexed_case = False
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ fields:
generic object: ALIndividual
code: |
x.party_type_filtered_options, x.party_type = filter_codes(
party_type_options, x.party_type_filters, x.party_type_default, x.party_type_exclude)
party_type_options, x.party_type_filters, x.party_type_default, x.party_type_exclude if hasattr(x, 'party_type_exclude') else None)
if x.party_type is None:
del x.party_type
x.party_type = x.user_chosen_party_type
Expand Down

0 comments on commit 8ddce5a

Please sign in to comment.