vregistry.py
changeset 2770 356e9d7c356d
parent 2769 1800aa0bf396
child 2771 8074dd88e21b
equal deleted inserted replaced
2769:1800aa0bf396 2770:356e9d7c356d
   241         raise `ObjectNotFound` if not object with id <oid> in <registry>
   241         raise `ObjectNotFound` if not object with id <oid> in <registry>
   242         raise `NoSelectableObject` if not object apply
   242         raise `NoSelectableObject` if not object apply
   243         """
   243         """
   244         return self[registry].select(oid, *args, **kwargs)
   244         return self[registry].select(oid, *args, **kwargs)
   245 
   245 
   246     @deprecated('use vreg[registry].select_object(oid, *args, **kwargs)')
   246     @deprecated('use vreg[registry].select_or_none(oid, *args, **kwargs)')
   247     def select_object(self, registry, oid, *args, **kwargs):
   247     def select_object(self, registry, oid, *args, **kwargs):
   248         """return the most specific object in <registry>.<oid> according to
   248         """return the most specific object in <registry>.<oid> according to
   249         the given context, or None if no object apply
   249         the given context, or None if no object apply
   250         """
   250         """
   251         return self[registry].select_object(oid, *args, **kwargs)
   251         return self[registry].select_or_none(oid, *args, **kwargs)
   252 
   252 
   253     @deprecated('use vreg[registry].possible_objects(*args, **kwargs)')
   253     @deprecated('use vreg[registry].possible_objects(*args, **kwargs)')
   254     def possible_objects(self, registry, *args, **kwargs):
   254     def possible_objects(self, registry, *args, **kwargs):
   255         """return an iterator on possible objects in <registry> for the given
   255         """return an iterator on possible objects in <registry> for the given
   256         context
   256         context