blob: bb29c9487ee25381dc91649e3fd5c3e6192dc805 [file] [log] [blame]
Tony Mack387a73f2013-09-18 07:59:14 -04001from core.models import Site
2from observer.delete import Deleter
3
4class SiteDeleter(Deleter):
5 model='Site'
6
7 def call(self, pk):
8 site = Site.objects.get(pk=pk)
9 if site.tenant_id:
10 self.driver.delete_tenant(site.tenant_id)
11 site.delete()