Skip to content

Commit

Permalink
added a check that the corpNum is not None (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorwolpert authored Sep 27, 2021
1 parent b9d9277 commit 9caa8ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/namex/models/name.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def update_nr_name_search(mapper, connection, target):
# set nr state to consumed
name_consume_history = get_history(name, 'corpNum')
current_app.logger.debug('name_consume_history.added {}'.format(nr.nrNum))
if len(name_consume_history.added):
if len(name_consume_history.added) and name.corpNum:
# Adding an after_flush_postexec to avoid connection and transaction closed issue's
# Creating one time execution event when ever corpNum is added to a name
# corpNum sets from nro-extractor job
Expand Down

0 comments on commit 9caa8ce

Please sign in to comment.