- def delete(self, commit = True):
- """
- Delete existing slice attribute type.
- """
-
- assert 'attribute_type_id' in self
-
- # Clean up miscellaneous join tables
- for table in ['slice_attribute_types', 'slice_attribute']:
- self.api.db.do("DELETE FROM %s" \
- " WHERE attribute_type_id = %d" % \
- (table, self['attribute_type_id']), self)
-
- if commit:
- self.api.db.commit()
-