Revision 82c1c610 snf-cyclades-app/synnefo/db/models.py

b/snf-cyclades-app/synnefo/db/models.py
157 157
        else:
158 158
            # ON_DELETE = SET NULL
159 159
            self.virtual_machines.all().backend = None
160
            # Remove BackendNetworks of this Backend.
161
            # Do not use networks.all().delete(), since delete() method of
162
            # BackendNetwork will not be called!
163
            for net in self.networks.all():
164
                net.delete()
160 165
            super(Backend, self).delete(*args, **kwargs)
161 166

  
162 167
    def __init__(self, *args, **kwargs):

Also available in: Unified diff