summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-09-15 11:23:48 +0800
committerGitHub <noreply@github.com>2017-09-15 11:23:48 +0800
commit0f9e20b3d7a2c5f53cbf8d66e573b983288d06e0 (patch)
treed8e092253678abed9923232923dba8f60ad36125 /vendor
parente5d80b7090d7c1088854e8a0f8223bdf8a769d12 (diff)
downloadgitea-0f9e20b3d7a2c5f53cbf8d66e573b983288d06e0.tar.gz
gitea-0f9e20b3d7a2c5f53cbf8d66e573b983288d06e0.zip
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>
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/go-xorm/xorm/session_update.go24
-rw-r--r--vendor/vendor.json6
2 files changed, 16 insertions, 14 deletions
diff --git a/vendor/github.com/go-xorm/xorm/session_update.go b/vendor/github.com/go-xorm/xorm/session_update.go
index 6e9d11681c..4e0f656db3 100644
--- a/vendor/github.com/go-xorm/xorm/session_update.go
+++ b/vendor/github.com/go-xorm/xorm/session_update.go
@@ -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)
-
- var colName = col.Name
- if isStruct {
- session.afterClosures = append(session.afterClosures, func(bean interface{}) {
- col := table.GetColumn(colName)
- setColumnTime(bean, col, t)
- })
+ 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)
+ })
+ }
}
}
diff --git a/vendor/vendor.json b/vendor/vendor.json
index 7c4c157f39..75f7c888c5 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -468,10 +468,10 @@
"revisionTime": "2016-08-11T02:11:45Z"
},
{
- "checksumSHA1": "SoZDnkd5NdwE0g4MY1nTAl8ZtPo=",
+ "checksumSHA1": "lAzHeuH461JyawhsGLi27JpWsgs=",
"path": "github.com/go-xorm/xorm",
- "revision": "c29485f954ed6495861c0098f9a1642a467299c8",
- "revisionTime": "2017-09-10T12:58:18Z"
+ "revision": "3101e3bc440f16f151687d97bce94da063c486f5",
+ "revisionTime": "2017-09-15T01:51:15Z"
},
{
"checksumSHA1": "1ft/4j5MFa7C9dPI9whL03HSUzk=",