Make it more explicit which argument is the key_fields
authorSverre Rabbelier <srabbelier@gmail.com>
Thu, 26 Feb 2009 16:45:18 +0000
changeset 1507 2de05960936b
parent 1506 b908d671624e
child 1508 fd77fd8fab13
Make it more explicit which argument is the key_fields Patch by: Sverre Rabbelier
app/soc/logic/models/base.py
--- a/app/soc/logic/models/base.py	Thu Feb 26 09:02:51 2009 +0000
+++ b/app/soc/logic/models/base.py	Thu Feb 26 16:45:18 2009 +0000
@@ -412,12 +412,12 @@
       
     return entity
 
-  def updateOrCreateFromFields(self, properties, fields):
+  def updateOrCreateFromFields(self, properties, key_fields):
     """Like updateOrCreateFromKeyName, but resolves fields to a key_name first.
     """
 
     # attempt to retrieve the existing entity
-    key_name  = self.getKeyNameFromFields(fields)
+    key_name  = self.getKeyNameFromFields(key_fields)
 
     return self.updateOrCreateFromKeyName(properties, key_name)