Merge pull request #1667 from swordqiu/hotfix/qj-fix-task-user-cred-utf8-encode

fix: task usercred should be utf8 charset
This commit is contained in:
yunion-ci-robot
2019-07-11 12:16:56 +08:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -80,9 +80,9 @@ type STask struct {
ObjName string `width:"128" charset:"utf8" nullable:"false" list:"user"` // Column(VARCHAR(128, charset='utf8'), nullable=False)
ObjId string `width:"128" charset:"ascii" nullable:"false" list:"user" index:"true"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False)
TaskName string `width:"64" charset:"ascii" nullable:"false" list:"user"` // Column(VARCHAR(64, charset='ascii'), nullable=False)
UserCred mcclient.TokenCredential `width:"1024" charset:"ascii" nullable:"false" get:"user"` // Column(VARCHAR(1024, charset='ascii'), nullable=False)
UserCred mcclient.TokenCredential `width:"1024" charset:"utf8" nullable:"false" get:"user"` // Column(VARCHAR(1024, charset='ascii'), nullable=False)
// OwnerCred string `width:"512" charset:"ascii" nullable:"true"` // Column(VARCHAR(512, charset='ascii'), nullable=True)
Params *jsonutils.JSONDict `charset:"ascii" length:"medium" nullable:"false" get:"user"` // Column(MEDIUMTEXT(charset='ascii'), nullable=False)
Params *jsonutils.JSONDict `charset:"utf8" length:"medium" nullable:"false" get:"user"` // Column(MEDIUMTEXT(charset='ascii'), nullable=False)
Stage string `width:"64" charset:"ascii" nullable:"false" default:"on_init" list:"user"` // Column(VARCHAR(64, charset='ascii'), nullable=False, default='on_init')
+1 -1
View File
@@ -67,7 +67,7 @@ func (action *SActionlog) CustomizeCreate(ctx context.Context, userCred mcclient
if action.StartTime.IsZero() {
action.StartTime = now
}
return nil
return action.SOpsLog.CustomizeCreate(ctx, userCred, ownerId, query, data)
}
// Websockets 不再拉取 ActionLog 的消息,因此注释掉如下代码