File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -134,12 +134,14 @@ func ConfigVersionMiddleware(client clientnative.HAProxyClient) Adapter {
134134 if err != nil {
135135 http .Error (w , err .Error (), http .StatusNotImplemented )
136136 }
137- tr , _ := configuration .GetTransaction (tID )
138137 var v int64
139- if tr != nil && tr .Status == models .TransactionStatusInProgress {
140- v , err = configuration .GetConfigurationVersion (tr .ID )
141- } else {
138+ if tID == "" {
142139 v , err = configuration .GetConfigurationVersion ("" )
140+ } else {
141+ tr , _ := configuration .GetTransaction (tID )
142+ if tr != nil && tr .Status == models .TransactionStatusInProgress {
143+ v , err = configuration .GetConfigurationVersion (tr .ID )
144+ }
143145 }
144146 if err == nil {
145147 configVersion = strconv .FormatInt (v , 10 )
You can’t perform that action at this time.
0 commit comments