From 4aa7ab31b609fa27f7e9d8202aef1c0ad219e535 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Thu, 4 Jan 2024 17:55:01 +0500 Subject: [PATCH] delete site from gdrive backups --- websiteFunctions/website.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index b4c14b228..67d3ee4e5 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -2612,6 +2612,15 @@ def submitWebsiteDeletion(self, userID=None, data=None): execPath = execPath + " deleteVirtualHostConfigurations --virtualHostName " + websiteName ProcessUtilities.popenExecutioner(execPath) + ### delete site from dgdrive backups + + try: + + from websiteFunctions.models import GDriveSites + GDriveSites.objects.filter(domain=websiteName).delete() + except: + pass + data_ret = {'status': 1, 'websiteDeleteStatus': 1, 'error_message': "None"} json_data = json.dumps(data_ret) return HttpResponse(json_data)