mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-03 16:35:10 +00:00
fix: bulk delete playbook 500 error
This commit is contained in:
@@ -40,7 +40,8 @@ class PlaybookViewSet(OrgBulkModelViewSet):
|
|||||||
instance_id = instance.id
|
instance_id = instance.id
|
||||||
super().perform_destroy(instance)
|
super().perform_destroy(instance)
|
||||||
dest_path = safe_join(settings.DATA_DIR, "ops", "playbook", instance_id.__str__())
|
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):
|
def get_queryset(self):
|
||||||
queryset = super().get_queryset()
|
queryset = super().get_queryset()
|
||||||
|
Reference in New Issue
Block a user