Tony Mack | 387a73f | 2013-09-18 07:59:14 -0400 | [diff] [blame] | 1 | from core.models import Site |
2 | from observer.delete import Deleter | ||||
3 | |||||
4 | class 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() |