[ome-devel] possible bug in components/tools/OmeroPy/src/omero/tables.py

Josh Moore josh at glencoesoftware.com
Mon Apr 11 14:01:45 BST 2011


Hi Gianluigi,

big thanks for the bug report. You'll have seen that I opened

  http://trac.openmicroscopy.org.uk/ome/ticket/4913

and closed it with your patch on develop and dev_4_2.

Best wishes,
~Josh

On Apr 11, 2011, at 12:46 PM, Gianluigi Zanetti wrote:

> Greetings.
> It appears that the current (as of the current git src) implementation
> of table.update() will only work if one is updating the first row of a
> table. 
> 
> ----------------------------------------------------------------------------
>    @stamped
>    def update(self, stamp, data):
>        if data:
>            for rn in data.rowNumbers:
>                for col in data.columns:
>                    getattr(self.__mea.cols, col.name)[rn] = col.values[rn]
>        self.__mea.flush()
> ----------------------------------------------------------------------------
> 
> a possible fix could be:
> 
> ----------------------------------------------------------------------------
>    @stamped
>    def update(self, stamp, data):
>        if data:
>            for i, rn in enumerate(data.rowNumbers):
>                for col in data.columns:
>                    getattr(self.__mea.cols, col.name)[rn] = col.values[i]
>        self.__mea.flush()
> ----------------------------------------------------------------------------
> 
> 
> --gianluigi
> 
> p.s.
> I had to add this patch to get 4.2 working, I did not check if it creates problems in the 4.3dev



More information about the ome-devel mailing list