strip tags from annotation.sortvalue

This commit is contained in:
j 2011-11-03 12:44:53 +01:00
parent 7eeb6dc107
commit af2c26a36a

View file

@ -58,9 +58,15 @@ class Annotation(models.Model):
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
set_public_id = not self.id or not self.public_id set_public_id = not self.id or not self.public_id
self.sortvalue = None if self.value:
if self.value.strip(): sortvalue = ox.stripTags(self.value).strip()
self.sortvalue = sort_string(self.value)[:1000] sortvalue = sort_string(sortvalue)
if sortvalue:
self.sortvalue = sortvalue[:1000]
else:
self.sortvalue = None
else:
self.sortvalue = None
#no clip or update clip #no clip or update clip
def get_layer(id): def get_layer(id):