-
- def delete(self, commit = True):
- assert 'key_type' in self
-
- # Clean up miscellaneous join tables
- for table in ['keys', 'key_types']:
- self.api.db.do("DELETE FROM " + table + \
- " WHERE key_type = %(key_type)s",
- self)
-
- if commit:
- self.api.db.commit()