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

RFE: Wrapper always throws an exception when object is not loaded

Reported by: atarkowska Owned by: wmoore
Priority: critical Milestone: Unscheduled
Component: OmeroPy Version: n.a.
Keywords: n.a. Cc: python-team@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description (last modified by atarkowska)

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 (12)

comment:1 Changed 13 years ago by atarkowska

  • Cc python-team@… added
  • Component changed from General to OmeroPy
  • Description modified (diff)
  • Milestone changed from OMERO-Beta4.3 to OMERO-Beta4.3.1
  • Priority changed from minor to critical
  • Sprint 2011-06-16 (14) deleted
  • Summary changed from Wrapper always throws an exception when object is not loaded to REL: Wrapper always throws an exception when object is not loaded

comment:2 Changed 13 years ago by jburel

  • Summary changed from REL: Wrapper always throws an exception when object is not loaded to RFE: Wrapper always throws an exception when object is not loaded

comment:3 Changed 13 years ago by wmoore

Hi Ola - maybe need to discuss this a bit more: What is the behavior we want when we've wrapped a deleted object??

comment:4 Changed 13 years ago by wmoore

  • Milestone changed from OMERO-Beta4.3.1 to OMERO-Beta4.3.2
  • Sprint 2011-07-07 (1) deleted

Not going to make big changes to exception handling in 4.3.1, pushing.

comment:5 Changed 13 years ago by jmoore

  • Owner wmoore deleted

Removing Will as owner in case someone can implement before he gets back.

comment:6 Changed 13 years ago by jburel

Referencing ticket #5194 has changed sprint.

comment:7 Changed 13 years ago by jburel

  • Milestone changed from OMERO-Beta4.3.2 to OME-5.0

comment:8 Changed 12 years ago by jburel

  • Milestone changed from OMERO-Beta4.4 to OMERO-Beta4.4.1
  • Owner set to wmoore

Following discussion with Will, pushing to 4.4.1

comment:9 Changed 12 years ago by jmoore

Referencing ticket #9092 has changed sprint.

comment:10 Changed 8 years ago by jamoore

Referencing ticket #9092 has changed sprint.

comment:11 Changed 8 years ago by jamoore

Referencing ticket #9092 has changed sprint.

comment:12 Changed 8 years ago by jamoore

  • Milestone changed from 5.x to Unscheduled
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.71556 sec.)

We're Hiring!