File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -486,7 +486,7 @@ def delete(
486486 transaction : bool = True ,
487487 safemode : Union [bool , None ] = None ,
488488 force_parts : bool = False ,
489- force_masters : bool = True ,
489+ force_masters : bool = False ,
490490 ) -> int :
491491 """
492492 Deletes the contents of the table and its dependent tables, recursively.
@@ -499,7 +499,7 @@ def delete(
499499 is `dj.config['safemode']`.
500500 force_parts: Delete from parts even when not deleting from their masters.
501501 force_masters: If `True`, include part/master pairs in the cascade.
502- Default is `True `.
502+ Default is `False `.
503503
504504 Returns:
505505 Number of deleted rows (excluding those from dependent tables).
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def test_delete_parts(schema_simp_pop):
127127def test_delete_parts_complex (schema_simp_pop ):
128128 """test issue #151 with complex master/part. PR #1158."""
129129 prev_len = len (G ())
130- (A () & "id_a=1" ).delete ()
130+ (A () & "id_a=1" ).delete (force_masters = True )
131131 assert prev_len - len (G ()) == 16 , "Failed to delete parts"
132132
133133
You can’t perform that action at this time.
0 commit comments