File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ def dcor_purge_unused_collections_and_circles(
251251 dry_run : bool = False ):
252252 """Purge old collections and circles that don't contain any datasets"""
253253 # Iterate over all collections
254- for group in model .Group .iterall ():
254+ for ( group ,) in model .Session . query ( model . Group .id ). all ():
255255 # Check group children
256256 if group .get_children_groups ():
257257 print (f"Ignoring group '{ group .id } ' with children" )
Original file line number Diff line number Diff line change @@ -257,6 +257,7 @@ def test_dcor_prune_draft_datasets(cli):
257257 res = cli .invoke (ckan_cli ,
258258 ["dcor-prune-draft-datasets" ,
259259 "--older-than-days" , "1" ])
260+ print (res .output_bytes )
260261 assert res .exit_code == 0
261262 assert helpers .call_action ("package_show" , id = ds_dict ["id" ])
262263
@@ -397,6 +398,7 @@ def test_dcor_purge_unused_collections_and_circles(cli):
397398 # since they were just created.
398399 res = cli .invoke (ckan_cli ,
399400 ["dcor-purge-unused-collections-and-circles" ])
401+ print (res .output_bytes )
400402 assert res .exit_code == 0
401403 assert helpers .call_action ("group_show" ,
402404 context ,
You can’t perform that action at this time.
0 commit comments