Skip to content

Commit 7964a97

Browse files
committed
reg: get correct group model
1 parent 3e6ccbf commit 7964a97

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ckanext/dcor_schemas/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ 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.Session.query(model.Group.id).all():
254+
for (group_id,) in model.Session.query(model.Group.id).all():
255+
group = model.Group.get(group_id)
255256
# Check group children
256257
if group.get_children_groups():
257258
print(f"Ignoring group '{group.id}' with children")

0 commit comments

Comments
 (0)