Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create email settings for new TestPlan. Fix #181
also change post_delete to pre_delete signal. Explanation: There is a TestPlan object and the TestPlan.email_settings attribute points to TestPlanEmailSettings object. When we delete the TP Django will first delete the TPES object, then initiate TP.delete() and at the end of it send the post_delete signal. Upon receiving of this signal the TPES object doesn't exist anymore and trying to access it via TP.emailing property tries to create a new TPES object pointing to the TP instance. Because it has already been deleted from the DB MySQL integrity check fails. The only way is to notify users about plan deletion using a pre_delete signal because all objects are still available in the database. Signed-off-by: Mr. Senko <atodorov@mrsenko.com>
- Loading branch information