Merged in bugfix/device-deletion (pull request #40)
Delete related widgets when deleting devicesdevelop
commit
d1a59c404b
|
@ -135,6 +135,8 @@ class Device(db.Model):
|
||||||
cascade="save-update, merge, delete")
|
cascade="save-update, merge, delete")
|
||||||
recordings = db.relationship("Recording",
|
recordings = db.relationship("Recording",
|
||||||
cascade="save-update, merge, delete")
|
cascade="save-update, merge, delete")
|
||||||
|
widgets = db.relationship("DashboardWidget",
|
||||||
|
cascade="save-update, merge, delete")
|
||||||
|
|
||||||
def __init__(self, name, configuration=None, device_type=1):
|
def __init__(self, name, configuration=None, device_type=1):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
Loading…
Reference in New Issue