Skip to content

Commit

Permalink
Merge pull request #179 from TaleLin/hotfix/#178
Browse files Browse the repository at this point in the history
fix: issue #178
  • Loading branch information
Jokky6 authored Nov 22, 2021
2 parents 9ba0b15 + 689911a commit 6c9e9b0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/api/cms/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,6 @@ def get_captcha():
image, code = CaptchaTool().get_verify_code()
secret_key = current_app.config.get("SECRET_KEY")
serializer = JWSSerializer(secret_key)
tag = serializer.dumps(code)
tag = str(serializer.dumps(code), encoding="utf-8")
image = str(image, encoding="utf-8")
return {"tag": tag, "image": image}
2 changes: 1 addition & 1 deletion app/model/lin/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def count_by_email(cls, email) -> int:

@classmethod
def select_page_by_group_id(cls, group_id, root_group_id) -> list:
""" 通过分组id分页获取用户数据 """
"""通过分组id分页获取用户数据"""
query = db.session.query(manager.user_group_model.user_id).filter(
manager.user_group_model.group_id == group_id,
manager.user_group_model.group_id != root_group_id,
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Lin-CMS==0.3.1
Flask-Cors==3.0.9
python-dotenv==0.15.0
pytest-ordering==0.6
Pillow==8.4.0
1 change: 1 addition & 0 deletions requirements-prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Flask-Cors==3.0.9
python-dotenv==0.15.0
gevent==20.9.0
gunicorn==20.0.4
Pillow==8.4.0

0 comments on commit 6c9e9b0

Please sign in to comment.