Skip to content

Commit

Permalink
MHR API search report exclude EXRE unit notes. (#1526)
Browse files Browse the repository at this point in the history
Signed-off-by: Doug Lovett <[email protected]>
  • Loading branch information
doug-lovett authored Sep 11, 2023
1 parent c8d6119 commit 56305f2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
{% endif %}
</td>
</tr>
{% if note.documentType not in ('TAXN', 'NCON', 'NPUB', 'REST') %}
<tr>
<td class="section-sub-title">
{% if note.documentType in ('EXNR', 'EXRS') %}Destroyed Date:{% else %}Expiry Date:{% endif %}
Expand All @@ -45,6 +46,7 @@
{% endif %}
</td>
</tr>
{% endif %}
<tr>
<td class="section-sub-title">Remarks:</td>
<td>{% if note.remarks is defined and note.remarks != '' %}
Expand Down
2 changes: 1 addition & 1 deletion mhr_api/src/mhr_api/models/db2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ def get_search_json(registration):
include: bool = True
doc_type = note.get('documentType', '')
current_app.logger.debug('updating doc type=' + doc_type)
if doc_type in ('103', '103E', 'STAT'): # Always exclude
if doc_type in ('103', '103E', 'STAT', 'EXRE'): # Always exclude
include = False
elif not registration.staff and doc_type in ('102', 'NCON'): # Always exclude for non-staff
include = False
Expand Down
2 changes: 1 addition & 1 deletion mhr_api/src/mhr_api/models/registration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def update_notes_search_json(notes_json: dict, staff: bool) -> dict:
for note in notes_json:
include: bool = True
doc_type = note.get('documentType', '')
if doc_type in ('REG_103', 'REG_103E', 'STAT'): # Always exclude
if doc_type in ('REG_103', 'REG_103E', 'STAT', 'EXRE'): # Always exclude
include = False
elif not staff and doc_type in ('REG_102', 'NCON'): # Always exclude for non-staff
include = False
Expand Down
2 changes: 1 addition & 1 deletion mhr_api/src/mhr_api/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
Development release segment: .devN
"""

__version__ = '1.5.4' # pylint: disable=invalid-name
__version__ = '1.5.5' # pylint: disable=invalid-name

0 comments on commit 56305f2

Please sign in to comment.