misc/migration/3.5.3_Any.py
author Julien Jehannet <julien.jehannet@logilab.fr>
Thu, 09 Jun 2011 16:41:41 +0200
branchstable
changeset 7530 15178bf89fb6
parent 3666 7d0f6234b001
child 8798 cdab3aadc679
permissions -rw-r--r--
[server] fix unicode conversion capability in UndoException By overriding the __unicode__ method, we ensure unicode builtin will return Unicode object even for python versions that don't have a __unicode__ method by default (python < 2.6) In previous versions, when this method is not defined, string conversion is attempted, and the result of string conversion is converted to Unicode using the system default encoding which is ascii the most of the time.

# type attribute might already be there if migrating from
# version < 3.5 to version >= 3.5.3, BaseTransition being added
# in bootstrap_migration
if versions_map['cubicweb'][0] >= (3, 5, 0):
    add_attribute('BaseTransition', 'type')
    sync_schema_props_perms('state_of')
    sync_schema_props_perms('transition_of')