I'd probably use a function or virtual field for that, not store it in DB. And it could be cleaned up a bit. Something like:
def trunc_desc(s) if len(s) > 128: return s[:128] + '...' return s
I'd probably use a function or virtual field for that, not store it in DB. And it could be cleaned up a bit. Something like:
def trunc_desc(s) if len(s) > 128: return s[:128] + '...' return s