diff --git a/class_mgt.py b/class_mgt.py index 1c16c6a..596b241 100644 --- a/class_mgt.py +++ b/class_mgt.py @@ -1020,11 +1020,14 @@ def get_partner_class(diction): " filt_external_code = "+str(filt_external_code)+ " filt_title = "+str(filt_title)) + val_tmp = 1 for retVal in coll_name.find(({"$and": [ {'valide':'1'},{'locked':'0'}, {'partner_owner_recid':user_recid} ,filt_external_code, filt_title ]})): mycommon.myprint(str(retVal)) user = retVal + user['id'] = str(val_tmp) RetObject.append(JSONEncoder().encode(user)) + val_tmp = val_tmp + 1 return True, RetObject diff --git a/wrapper.py b/wrapper.py index 77d6dcf..3c4539e 100644 --- a/wrapper.py +++ b/wrapper.py @@ -175,12 +175,15 @@ def get_all_class(diction): coll_name = dbname['myclass'] + val_tmp = 1 insertObject = [] for x in coll_name.find({'valide':'1', 'locked':'0'}, {"_id": 0, "indexed": 0, "indexed_desc": 0, "indexed_obj": 0, "indexed_title": 0, "valide": 0, "locked": 0, "partner_owner_recid": 0, }): mycommon.myprint(x) user = x + user['id'] = str(val_tmp) insertObject.append(JSONEncoder().encode(user)) + val_tmp = val_tmp + 1 #mycommon.myprint(" insertObject = ", insertObject) return True, insertObject