32958 Business Emailer - updates for reg and cor#4542
Conversation
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
| if identifier[:2] != "CP": | ||
| # only add recipients if not coop | ||
| recipients = get_recipient_from_auth(identifier, token) | ||
| identifier = filing_json["filing"]["business"]["identifier"] |
There was a problem hiding this comment.
get_recipients reads filing_json["filing"]["business"]["identifier"] directly (line 66), but new business filings like incorporation and registration don't have a business block yet (your own prep_registration_filing deletes it for PAID), so this'll throw a KeyError on something like a future-effective incorporation
can we guard it with .get("business", {})?
There was a problem hiding this comment.
This is actually required by the schema so it will always be there. In the case of a bootstrap filing (incorp/amalg/cont in/registration) this would be a temporary identifier (regardless if its future effective or not). I will update the tests so that its realistic / more clear
There was a problem hiding this comment.
Okay I adjusted a couple things to make it more clear about the temp reg and made the tests setup more realistic
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
|

Issue #: /bcgov/entity#32958
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).