do not go through the sfatables code, if the current rule list is empty
[sfa.git] / sfa / methods / update.py
index ddaaf18..4076e97 100644 (file)
@@ -30,12 +30,13 @@ class update(Method):
     accepts = [
         Parameter(str, "Credential string"),
         Parameter(dict, "Record dictionary to be updated"),
-        Parameter(str, "Request hash")
+        Mixed(Parameter(str, "Request hash"),
+              Parameter(None, "Request hash not specified"))
         ]
 
     returns = Parameter(int, "1 if successful")
     
-    def call(self, cred, record_dict, request_hash, caller_cred=None):
+    def call(self, cred, record_dict, request_hash=None, caller_cred=None):
         if caller_cred==None:
                caller_cred=cred