hooks/syncschema.py
changeset 11038 7cb02ab4f321
parent 11005 f8417bd135ed
child 11106 012e6c7d02ef
equal deleted inserted replaced
11037:621ad47c7c86 11038:7cb02ab4f321
   461         props = {'default': default,
   461         props = {'default': default,
   462                  'indexed': entity.indexed,
   462                  'indexed': entity.indexed,
   463                  'fulltextindexed': entity.fulltextindexed,
   463                  'fulltextindexed': entity.fulltextindexed,
   464                  'internationalizable': entity.internationalizable}
   464                  'internationalizable': entity.internationalizable}
   465         if entity.extra_props:
   465         if entity.extra_props:
   466             props.update(json.load(entity.extra_props))
   466             props.update(json.loads(entity.extra_props.getvalue().decode('ascii')))
   467         # entity.formula may not exist yet if we're migrating to 3.20
   467         # entity.formula may not exist yet if we're migrating to 3.20
   468         if hasattr(entity, 'formula'):
   468         if hasattr(entity, 'formula'):
   469             props['formula'] = entity.formula
   469             props['formula'] = entity.formula
   470         # update the in-memory schema first
   470         # update the in-memory schema first
   471         rdefdef, rdef = self.init_rdef(**props)
   471         rdefdef, rdef = self.init_rdef(**props)