def clear_tags(self):
        """Clear all tags in an object."""
        from core.schemas import tag

        for obj_tag in self.tags:
            db_tag = tag.Tag.find(name=obj_tag.name)
            db_tag.count -= 1
            db_tag.save()
        self.tags = []
        self.save()
Clear all tags in an object.
core/schemas/model.py