Restored QA Deployment: Corrected Mail Sharing Module Import
Executive summary
A one-line import correction in the backend's bulk selection service restored the QA environment, which had been failing to start due to an import error. The MailShares and MailShareRecipients models are now imported from their correct module, unblocking QA testing.
Why this was needed
A recent change referenced the MailShares and MailShareRecipients database models from the wrong module (mails_models.py), where they are not defined. They actually live in mail_status_sharing_models.py. This mismatch raised a Python ImportError at application startup, which prevented the backend from booting and blocked deployment to the QA environment.
Client / user impact
Restores the QA environment to a working state so that backend services start cleanly and QA testing can proceed. There is no user-visible feature change; this is a stability fix that unblocks the release pipeline. Mail sharing functionality is no longer at risk from a startup failure tied to this code path.
Technical scope
- Single file changed:
app/services/dynamic_grid/bulk_selection_service.py(2 additions, 1 deletion). - Split the import so
MailsandMailFoldercontinue to come fromapp.models.dms.mails_models. MailSharesandMailShareRecipientsare now imported fromapp.models.dms.mail_status_sharing_models, their actual definition location.- No logic, schema, or behavioral changes beyond the corrected import path.
Risk & mitigation
Very low risk. The change only corrects where two model classes are imported from and does not alter runtime behavior or data. Mitigation: confirm the backend starts without import errors and that the bulk selection / mail sharing code paths that use these models execute correctly.
QA validation focus
- Confirm the backend deploys and starts on QA with no
ImportError. - Exercise mail sharing flows (share mail, manage share recipients) to verify the affected models load and function.
- Smoke-test the dynamic grid bulk selection feature that consumes
bulk_selection_service.py.