blob: a558eaf5ac1f3ce7970813bad8f7e8abe53940f6 [file] [log] [blame]
Tony Mack387a73f2013-09-18 07:59:14 -04001from core.models import Site
Tony Macke4be32f2014-03-11 20:45:25 -04002from observer.deleter import Deleter
Tony Mack387a73f2013-09-18 07:59:14 -04003
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()