Conditions | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
24 | def get(self, object): |
||
25 | """Sets the value of this field from the given object. |
||
26 | The returned value is encoded as UTF-8 to maintain compatibility with |
||
27 | the legacy behavior of auto-generated getters in AT content types. |
||
28 | """ |
||
29 | value = super(TextLineField, self).get(object) |
||
30 | if isinstance(value, six.string_types): |
||
31 | value = value.encode("utf-8") |
||
32 | return value |
||
33 |