Add debug prints
This commit is contained in:
parent
d3a4ddd314
commit
3d7025ee4b
@ -41,10 +41,13 @@ def view_users():
|
||||
@check_api_key
|
||||
def get_group_cards():
|
||||
groups = request.json.get("groups", False)
|
||||
users = get_users()
|
||||
print(groups)
|
||||
print(users)
|
||||
if not groups:
|
||||
return "must specify groups in parameter", 400
|
||||
print(groups)
|
||||
gu = list(filter(lambda u: any(g["name"] in groups for g in u["status"]["groups"]), get_users()))
|
||||
gu = list(filter(lambda u: any(g["name"] in groups for g in u["status"]["groups"]), users))
|
||||
print(gu)
|
||||
keys = list(map(lambda u: u["metadata"]["name"], gu))
|
||||
print(keys)
|
||||
flt = {
|
||||
@ -61,5 +64,7 @@ def get_group_cards():
|
||||
if obj["inventory"] and obj["inventory"]["owner"] and type(obj["inventory"]["owner"]["foreign_id"]) != str:
|
||||
del obj["inventory"]
|
||||
found.append(obj)
|
||||
return jsonify(list(found))
|
||||
fl = list(found)
|
||||
print(fl)
|
||||
return jsonify(fl)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user