File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
microsetta_private_api/repo/tests Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -428,7 +428,8 @@ def tearDown(self):
428
428
)
429
429
cur .execute (
430
430
"DELETE FROM campaign.transaction "
431
- "WHERE id IN %s" ,
431
+ "WHERE id IN %s "
432
+ "RETURNING interested_user_id" ,
432
433
(
433
434
(
434
435
FFQ_TRANSACTION_ID ,
@@ -439,10 +440,16 @@ def tearDown(self):
439
440
),
440
441
)
441
442
)
443
+ inserted_iu_ids = [tup [0 ] for tup in cur .fetchall ()]
442
444
cur .execute (
443
445
"DELETE FROM campaign.interested_users AS iu "
444
446
"WHERE iu.interested_user_id IN %s" ,
445
- (tuple (self .iu_ids ), )
447
+ (
448
+ (
449
+ * inserted_iu_ids ,
450
+ * self .iu_ids
451
+ ),
452
+ ) # self.iu_ids contains iu without transaction
446
453
)
447
454
cur .execute (
448
455
"DELETE FROM campaign.campaigns_projects "
You can’t perform that action at this time.
0 commit comments