Delete related widgets when deleting devices
parent
83116c28c6
commit
6381ae1328
|
@ -135,6 +135,8 @@ class Device(db.Model):
|
|||
cascade="save-update, merge, delete")
|
||||
recordings = db.relationship("Recording",
|
||||
cascade="save-update, merge, delete")
|
||||
widgets = db.relationship("DashboardWidget",
|
||||
cascade="save-update, merge, delete")
|
||||
|
||||
def __init__(self, name, configuration=None, device_type=1):
|
||||
self.name = name
|
||||
|
|
Loading…
Reference in New Issue