Ver código fonte

pending preliminaries done (wip)

* still needs testing and some other cleanup
clementinecomputing 4 anos atrás
pai
commit
a48a2c1e24
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      server/scripts/PopufareAPI.py

+ 3 - 0
server/scripts/PopufareAPI.py

@@ -1085,6 +1085,8 @@ def Pending(db, ctx):
     if f in ctx:
       if (type(ctx[f]) == int) or (ctx[f] and ((type(ctx[f]) != int) and (len(ctx[f]) > 0))):
         val[f] = ctx[f]
+  if not "comment" in val:
+    val["comment"] = ''
 
   if (ctx["action"] == "getall"):
     query = "select org_card_order_queue_id, userid, logical_card_id, "
@@ -1113,6 +1115,7 @@ def Pending(db, ctx):
     res["result"] = "success"
 
   if (ctx["action"] == "get"):
+
     query = "select org_card_order_queue_id, userid, logical_card_id, "
     query += " date_format(created, '%Y-%m-%d %H:%i:%S'), "
     query += " date_format(processed,'%Y-%m-%d %H:%i:%S'), comment, pending "