app/soc/logic/models/base.py
changeset 317 87215136c268
parent 308 740090cd17c9
child 354 b931c74abbee
equal deleted inserted replaced
316:9efdc7bc3565 317:87215136c268
    78     Args:
    78     Args:
    79       **kwargs: the fields of the entity that uniquely identifies it
    79       **kwargs: the fields of the entity that uniquely identifies it
    80 
    80 
    81     Returns:
    81     Returns:
    82       * None if a field is false.
    82       * None if a field is false.
    83       * Eentity for supplied fields
    83       * Entity for supplied fields
    84 
    84 
    85     Raises:
    85     Raises:
    86       out_of_band.ErrorResponse if link name is not false, but no Sponsor entity
    86       out_of_band.ErrorResponse if link name is not false, but no Sponsor entity
    87       with the supplied link name exists in the Datastore
    87       with the supplied link name exists in the Datastore
    88     """
    88     """
   169 
   169 
   170   def updateOrCreateFromKeyName(self, properties, key_name):
   170   def updateOrCreateFromKeyName(self, properties, key_name):
   171     """Update existing entity, or create new one with supplied properties.
   171     """Update existing entity, or create new one with supplied properties.
   172 
   172 
   173     Args:
   173     Args:
   174       properties: dictionairy with entity properties and their values
   174       properties: dict with entity properties and their values
   175       key_name: the key_name of the entity that uniquely identifies it
   175       key_name: the key_name of the entity that uniquely identifies it
   176 
   176 
   177     Returns:
   177     Returns:
   178       the entity corresponding to the key_name, with any supplied
   178       the entity corresponding to the key_name, with any supplied
   179       properties changed, or a new entity now associated with the
   179       properties changed, or a new entity now associated with the