importhub should be able to delete

This commit is contained in:
Laura Klünder 2024-12-27 16:35:37 +01:00
parent 77af72d590
commit 8b0c472d28

View file

@ -354,6 +354,7 @@ class Command(BaseCommand):
", is now"+str([group.title for group in new_groups]), new_group_ids, old_group_ids) ", is now"+str([group.title for group in new_groups]), new_group_ids, old_group_ids)
for import_tag, location in locations_so_far.items(): for import_tag, location in locations_so_far.items():
if location.import_block_data:
self.do_report( self.do_report(
prefix='hub:new_groups', prefix='hub:new_groups',
obj_id=import_tag, obj_id=import_tag,
@ -361,8 +362,10 @@ class Command(BaseCommand):
report=Report( report=Report(
category="location-issue", category="location-issue",
title="importhub: delete this", title="importhub: delete this",
description="hub wants to delete this", description="hub wants to delete this but it's blocked",
location=location, location=location,
) )
) )
print(f"NOTE: {location.slug} / {import_tag} should be deleted") print(f"NOTE: {location.slug} / {import_tag} should be deleted")
else:
location.delete()