Created attachment 914443 [details] [R|W separation] There is a query action happened on master db when invoke TestCaseRun.attach_bug method. Description of problem: as summary. Version-Release number of selected component (if applicable): v3.8.9-1 on test server. How reproducible: 100% Steps to Reproduce: 1.Invoke TestCaseRun.attach_bug method like: n.TestCaseRun.attach_bug({ 'case_run_id': 5376601, 'bug_id': 22222, 'bug_system_id': 1, 'summary': 'Testing TCMS', 'description': 'qiyang test', }) 2.Check whether there is query action happened on master db. Actual results: There is a query action happened on master db, like: | 2014-07-03 18:45:34 | nitrate[nitrate] @ tcms-test.app.eng.nay.redhat.com [10.66.78.233] | 318 | 10133 | Query | SELECT `test_case_bugs`.`id`, `test_case_bugs`.`bug_id`, `test_case_bugs`.`case_run_id`, `test_case_bugs`.`case_id`, `test_case_bugs`.`bug_system_id`, `test_case_bugs`.`summary`, `test_case_bugs`.`description` FROM `test_case_bugs` WHERE (`test_case_bugs`.`case_id` = 46490 AND `test_case_bugs`.`case_id` = 46490 AND `test_case_bugs`.`bug_id` = '22222' AND `test_case_bugs`.`description` = 'qiyang test' AND `test_case_bugs`.`summary` = 'Testing TCMS' AND `test_case_bugs`.`bug_system_id` = 1 AND `test_case_bugs`.`case_run_id` = 5376601 ) | Expected results: There is no query action happened on master db. Additional info:
it's django get_or_create() method behavior, we can not modify its source code.
won't fix
Confirm with dev, can not modify the source code, so close the issue.