Gitiles
Code Review
Sign In
gerrit.opencord.org
/
xos
/
050b1b807c5d6c3388589b3b937c6e8f63309de4
/
.
/
planetstack
/
observer
/
deleters
/
site_deleter.py
blob: a558eaf5ac1f3ce7970813bad8f7e8abe53940f6 [
file
] [
log
] [
blame
]
from
core
.
models
import
Site
from
observer
.
deleter
import
Deleter
class
SiteDeleter
(
Deleter
):
model
=
'Site'
def
call
(
self
,
pk
):
site
=
Site
.
objects
.
get
(
pk
=
pk
)
if
site
.
tenant_id
:
self
.
driver
.
delete_tenant
(
site
.
tenant_id
)
site
.
delete
()