fix: bulk delete playbook 500 error

pull/13598/head
wangruidong 5 months ago committed by w940853815
parent 82a6702c90
commit da8b328f80

@ -40,7 +40,8 @@ class PlaybookViewSet(OrgBulkModelViewSet):
instance_id = instance.id
super().perform_destroy(instance)
dest_path = safe_join(settings.DATA_DIR, "ops", "playbook", instance_id.__str__())
shutil.rmtree(dest_path)
if os.path.exists(dest_path):
shutil.rmtree(dest_path)
def get_queryset(self):
queryset = super().get_queryset()

Loading…
Cancel
Save