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 {
134
134
if err != nil {
135
135
http .Error (w , err .Error (), http .StatusNotImplemented )
136
136
}
137
- tr , _ := configuration .GetTransaction (tID )
138
137
var v int64
139
- if tr != nil && tr .Status == models .TransactionStatusInProgress {
140
- v , err = configuration .GetConfigurationVersion (tr .ID )
141
- } else {
138
+ if tID == "" {
142
139
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
+ }
143
145
}
144
146
if err == nil {
145
147
configVersion = strconv .FormatInt (v , 10 )
You can’t perform that action at this time.
0 commit comments