Yes, very intentional. Field.__get__  calls .from_json(default()) on the
value; so, it must be json. and json works best for caching from db reads
:-)


On Fri, Sep 6, 2013 at 9:05 AM, Calen Pennington
<notifications@github.com>wrote:

> In common/lib/xmodule/xmodule/modulestore/inheritance.py:
>
> > @@ -21,59 +52,69 @@ def compute_inherited_metadata(descriptor):
> >
> >      NOTE: This means that there is no such thing as lazy loading at the
> >      moment--this accesses all the children."""
> > -    for child in descriptor.get_children():
> > -        inherit_metadata(child, descriptor._model_data)
> > -        compute_inherited_metadata(child)
> > +    if descriptor.has_children:
> > +        parent_metadata = descriptor.xblock_kvs.inherited_settings.copy()
> > +        # add any of descriptor's explicitly set fields to the inheriting list
> > +        for field in InheritanceMixin.fields.values():
> > +            # pylint: disable = W0212
> > +            if descriptor._field_data.has(descriptor, field.name):
> > +                # inherited_settings values are json repr
> > +                parent_metadata[field.name] = field.read_json(descriptor)
>
> This switches the code back to storing json for the inherited settings,
> rather than python objects. Was that intentional?
>
> Also, you can now use field.is_set_on(descriptor), so that you don't have
> to reach into _field_data.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/844/files#r6207153>
> .
>