app/soc/logic/models/base.py
changeset 534 c31cfbf1a20f
parent 533 ba3309b2fd30
child 535 9045b8888772
equal deleted inserted replaced
533:ba3309b2fd30 534:c31cfbf1a20f
   466       the entity corresponding to the key_name, with any supplied
   466       the entity corresponding to the key_name, with any supplied
   467       properties changed, or a new entity now associated with the
   467       properties changed, or a new entity now associated with the
   468       supplied key_name and properties.
   468       supplied key_name and properties.
   469     """
   469     """
   470 
   470 
   471     import logging
       
   472     logging.info(key_name)
       
   473     logging.info(properties)
       
   474 
       
   475     entity = self.getFromKeyName(key_name)
   471     entity = self.getFromKeyName(key_name)
   476 
   472 
   477     if not entity:
   473     if not entity:
   478       # entity did not exist, so create one in a transaction
   474       # entity did not exist, so create one in a transaction
   479       entity = self._model.get_or_insert(key_name, **properties)
   475       entity = self._model.get_or_insert(key_name, **properties)