now showing only the first 50 characters of field contents
This commit is contained in:
parent
7a64c07ded
commit
86f62b282b
@ -11,7 +11,8 @@ def _asdict(self):
|
|||||||
if type(col.type) == db.types.BLOB:
|
if type(col.type) == db.types.BLOB:
|
||||||
d[col.key] = "Blob (NULL)" if self.__getattribute__(col.key) == None else f"Blob ({sys.getsizeof(self.__getattribute__(col.key))} Bytes)"
|
d[col.key] = "Blob (NULL)" if self.__getattribute__(col.key) == None else f"Blob ({sys.getsizeof(self.__getattribute__(col.key))} Bytes)"
|
||||||
else:
|
else:
|
||||||
d[col.key] = self.__getattribute__(col.key)
|
value = str(self.__getattribute__(col.key))
|
||||||
|
d[col.key] = value[:50] + '...' if len(value) > 50 else value
|
||||||
return d
|
return d
|
||||||
db.Model._asdict = _asdict
|
db.Model._asdict = _asdict
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user