update pay promo
This commit is contained in:
@@ -1742,7 +1742,12 @@ def update_profile():
|
||||
user.bio = form.get('bio')
|
||||
user.gender = form.get('gender')
|
||||
user.birth_date = datetime.strptime(form.get('birth_date'), '%Y-%m-%d') if form.get('birth_date') else None
|
||||
user.phone = form.get('phone')
|
||||
# 手机号更新逻辑:如果已通过微信验证绑定,则不允许通过表单覆盖
|
||||
# 防止用户更新其他资料时意外清空已绑定的手机号
|
||||
if not user.phone_confirmed:
|
||||
phone_value = form.get('phone')
|
||||
if phone_value is not None:
|
||||
user.phone = phone_value
|
||||
user.location = form.get('location')
|
||||
user.wechat_id = form.get('wechat_id')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user