Skip to content

Commit

Permalink
20714 Fix consent email getting sent when conditionally approved NR i…
Browse files Browse the repository at this point in the history
…s reset (#1518)

* only send consent email if consent flag is 'Received'

* bump version
  • Loading branch information
semmatti authored Apr 10, 2024
1 parent bc7e19c commit df2e4ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/namex/VERSION.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '1.1.51'
__version__ = '1.1.52'

2 changes: 1 addition & 1 deletion api/namex/resources/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def put(nr, *args, **kwargs):
if nrd.consentFlag != orig_nrd['consentFlag']:
is_changed_consent = True
emailer_enable = ldclient.get().variation('emailer-enable', {'key': 'anonymous'}, False)
if emailer_enable:
if emailer_enable and nrd.consentFlag == 'R':
thread = FlaskThread(target=Request._email_consent, args=(nrd.id, ))
thread.daemon = True
thread.start()
Expand Down

0 comments on commit df2e4ce

Please sign in to comment.