mirror of https://github.com/jumpserver/jumpserver
fix: bulk delete playbook 500 error
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…
Reference in New Issue