提交 10cf6d94 编写于 作者: U Ulric Qin

bugfix: do not update alias if alias is blank whenendpoint import

上级 b32775eb
......@@ -102,8 +102,10 @@ func endpointImport(session *xorm.Session, ident, alias string) error {
}
if has {
endpoint.Alias = alias
_, err = session.Where("ident=?", ident).Cols("alias").Update(endpoint)
if alias != "" {
endpoint.Alias = alias
_, err = session.Where("ident=?", ident).Cols("alias").Update(endpoint)
}
} else {
_, err = session.Insert(Endpoint{Ident: ident, Alias: alias})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册