Merge "TraitText value restricted to max length 255"
This commit is contained in:
commit
6405e63c2c
@ -121,6 +121,7 @@ class Trait(base.Model):
|
||||
return float(value)
|
||||
if trait_type is cls.DATETIME_TYPE:
|
||||
return timeutils.normalize_time(timeutils.parse_isotime(value))
|
||||
# Cropping the text value to match the TraitText value size
|
||||
if isinstance(value, six.binary_type):
|
||||
return value.decode('utf-8')
|
||||
return six.text_type(value)
|
||||
return value.decode('utf-8')[:255]
|
||||
return six.text_type(value)[:255]
|
||||
|
@ -344,7 +344,7 @@ class TraitText(Base):
|
||||
)
|
||||
event_id = Column(Integer, ForeignKey('event.id'), primary_key=True)
|
||||
key = Column(String(255), primary_key=True)
|
||||
value = Column(Text)
|
||||
value = Column(String(255))
|
||||
|
||||
|
||||
class TraitInt(Base):
|
||||
|
Loading…
x
Reference in New Issue
Block a user