xuyonghao
2024-12-27 fdbd37eb2516b67ca41b0b71b738e3368e2825fe
app/service/user.py
@@ -385,7 +385,7 @@
async def get_user_dept(db, user_id):
    res = {}
    user = db.query(UserModel).filter_by(id=user_id).first()
    res["rows"] = [i.to_dict() for i in user.organizations]
    res["rows"] = [i.to_dict() for i in user.organizations if i.status == DEPT_STATUS_ON]
    return res