mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-12-22 08:19:42 +01:00
bug fix: staging site issue
This commit is contained in:
@@ -216,8 +216,21 @@ class WebsiteManager:
|
||||
|
||||
if DeleteID != None:
|
||||
wstagingDelete = WPStaging.objects.get(pk=DeleteID, owner=WPobj)
|
||||
|
||||
# Get the associated staging WPSites and Websites records
|
||||
staging_wpsite = wstagingDelete.wpsite
|
||||
staging_website = staging_wpsite.owner
|
||||
|
||||
# Delete the WPStaging record first
|
||||
wstagingDelete.delete()
|
||||
|
||||
# Delete the staging WPSites record
|
||||
staging_wpsite.delete()
|
||||
|
||||
# Delete the staging Websites record and all associated data
|
||||
from plogical.vhost import vhost
|
||||
vhost.deleteVirtualHostConfigurations(staging_website.domain, staging_website.adminEmail, staging_website.package.packageName)
|
||||
|
||||
except BaseException as msg:
|
||||
da = str(msg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user