修复编辑所有者模板后无法保存的问题
This commit is contained in:
parent
ce05b26800
commit
cc5f449dd9
@ -754,8 +754,9 @@ export default {
|
||||
} else {
|
||||
console.error('更新失败 - response:', response);
|
||||
toast.error(response.message || '更新失败');
|
||||
this.editLoading = false;
|
||||
}
|
||||
// 确保在所有情况下都重置 loading 状态
|
||||
this.editLoading = false;
|
||||
},
|
||||
onError: (error) => {
|
||||
console.error('=== onError 回调 ===');
|
||||
|
||||
@ -499,7 +499,10 @@ class WestDomain:
|
||||
**template_data
|
||||
}
|
||||
|
||||
return self._make_request('/audit/', 'POST', body_params=body_params)
|
||||
# 对body_params进行GBK编码
|
||||
encoded_data = urlencode(body_params, encoding='gbk').encode('gbk')
|
||||
|
||||
return self._make_request('/audit/', 'POST', body_params=encoded_data)
|
||||
|
||||
def get_domain_real_info(self, domain: str) -> Dict[str, Any]:
|
||||
"""
|
||||
@ -3316,9 +3319,10 @@ def update_domain_owner(name, **data):
|
||||
|
||||
jingrow.log_error("update_domain_owner", f"更新的字段: {updated_fields}")
|
||||
|
||||
# 保存更新
|
||||
# 保存更新,使用 ignore_permissions=True 忽略权限检查
|
||||
jingrow.log_error("update_domain_owner", "正在保存本地更新...")
|
||||
domain_owner.save()
|
||||
domain_owner.save(ignore_permissions=True)
|
||||
jingrow.db.commit()
|
||||
jingrow.log_error("update_domain_owner", "本地记录保存成功")
|
||||
|
||||
return {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user