mirror of
https://github.com/veops/cmdb.git
synced 2025-08-08 14:50:56 +08:00
Dev api 20231019 (#210)
* fix(acl): get resources * fix(celery worker): db server has gone away
This commit is contained in:
@@ -260,7 +260,8 @@ class ResourceCRUD(object):
|
||||
numfound = query.count()
|
||||
res = [i.to_dict() for i in query.offset((page - 1) * page_size).limit(page_size)]
|
||||
for i in res:
|
||||
i['user'] = UserCache.get(i['uid']).nickname if i['uid'] else ''
|
||||
user = UserCache.get(i['uid']) if i['uid'] else ''
|
||||
i['user'] = user and user.nickname
|
||||
|
||||
return numfound, res
|
||||
|
||||
|
Reference in New Issue
Block a user