# HG changeset patch # User Julien Cristau # Date 1386854724 -3600 # Node ID eda5071e30a146434ed353395ff385966143ee08 # Parent 31a1813d53f3f18e468217aa21f4f5630fc3825f [migration] fix handling of default value for boolean attributes We can't assert that the old value is 'True' or 'False', because False used to be stored as an empty string in pre-3.18 versions. diff -r 31a1813d53f3 -r eda5071e30a1 misc/migration/3.18.0_Any.py --- a/misc/migration/3.18.0_Any.py Thu Dec 12 12:34:38 2013 +0100 +++ b/misc/migration/3.18.0_Any.py Thu Dec 12 14:25:24 2013 +0100 @@ -8,7 +8,8 @@ return atype = cwattr.to_entity[0].name if atype == 'Boolean': - assert default in ('True', 'False'), default + # boolean attributes with default=False were stored as '' + assert default in ('True', 'False', ''), repr(default) default = default == 'True' elif atype in ('Int', 'BigInt'): default = int(default)