strip tags from annotation.sortvalue
This commit is contained in:
parent
7eeb6dc107
commit
af2c26a36a
1 changed files with 9 additions and 3 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue