Tony Mack | 387a73f | 2013-09-18 07:59:14 -0400 | [diff] [blame] | 1 | from core.models import Site |
Tony Mack | e4be32f | 2014-03-11 20:45:25 -0400 | [diff] [blame] | 2 | from observer.deleter import Deleter |
Tony Mack | 387a73f | 2013-09-18 07:59:14 -0400 | [diff] [blame] | 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() |