forked from forgejo/forgejo
fix updated update on public key (#2514)
* fix updated update on public key * update vendor.json Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix root path Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
e5d80b7090
commit
0f9e20b3d7
2 changed files with 15 additions and 13 deletions
22
vendor/github.com/go-xorm/xorm/session_update.go
generated
vendored
22
vendor/github.com/go-xorm/xorm/session_update.go
generated
vendored
|
@ -202,17 +202,19 @@ func (session *Session) Update(bean interface{}, condiBean ...interface{}) (int6
|
|||
table := session.statement.RefTable
|
||||
|
||||
if session.statement.UseAutoTime && table != nil && table.Updated != "" {
|
||||
colNames = append(colNames, session.engine.Quote(table.Updated)+" = ?")
|
||||
col := table.UpdatedColumn()
|
||||
val, t := session.engine.NowTime2(col.SQLType.Name)
|
||||
args = append(args, val)
|
||||
if _, ok := session.statement.columnMap[strings.ToLower(table.Updated)]; !ok {
|
||||
colNames = append(colNames, session.engine.Quote(table.Updated)+" = ?")
|
||||
col := table.UpdatedColumn()
|
||||
val, t := session.engine.NowTime2(col.SQLType.Name)
|
||||
args = append(args, val)
|
||||
|
||||
var colName = col.Name
|
||||
if isStruct {
|
||||
session.afterClosures = append(session.afterClosures, func(bean interface{}) {
|
||||
col := table.GetColumn(colName)
|
||||
setColumnTime(bean, col, t)
|
||||
})
|
||||
var colName = col.Name
|
||||
if isStruct {
|
||||
session.afterClosures = append(session.afterClosures, func(bean interface{}) {
|
||||
col := table.GetColumn(colName)
|
||||
setColumnTime(bean, col, t)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue