Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #5782 (new)

Opened 13 years ago

Last modified 8 years ago

Wrapper always throws an exception when object is not loaded — at Initial Version

Reported by: atarkowska Owned by: wmoore
Priority: minor Milestone: OMERO-Beta4.3
Component: General Version: n.a.
Keywords: n.a. Cc: python-team@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2011-06-16 (14)

Description

If not loaded object is wrapped by BlitzObjectWrapper? or subclass the separate query is trying to get that object. If the object does not exist (was deleted) ValidationException? is thrown. That could be investigated and handled in a different way.

if hasattr(obj, 'id') and obj.id is not None:
    self._oid = obj.id.val
    if not self._obj.loaded:
        self._obj = self._conn.getQueryService().get(self._obj.__class__.__name__, self._oid)

Change History (0)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.72553 sec.)

We're Hiring!