and then we should notify object modified, shouldn't we ?


2014-04-08 19:10 GMT+02:00 vincentfretin <notifications@github.com>:

> In src/collective/contact/membrane/behaviors/personmembraneuser.py:
>
> > +        Set the property to the person object if it implements IContactDetails
> > +        else, try to update main held position.
> > +        """
> > +        if IContactDetails.providedBy(self.context):
> > +            storage = self.context
> > +        else:
> > +            main_position = IPersonHeldPositions(self.context).get_main_position()
> > +            if main_position:
> > +                storage = main_position
> > +            else:
> > +                return
> > +
> > +        properties = dict(propertysheet.propertyItems())
> > +        for prop_name, field_name in self.property_map.items():
> > +            value = properties.get(prop_name, '').strip()
> > +            setattr(storage, field_name, value)
>
> You should set only if value changed. Here the object will be marked as
> changed even if you didn't edit the properties.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/collective/collective.contact.membrane/pull/1/files#r11400290>
> .
>



-- 
Thomas Desvenain

Téléphone : 09 51 37 35 18