File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1130,14 +1130,19 @@ func (app *App) validate() error {
1130
1130
1131
1131
func (app * App ) validatePlan () error {
1132
1132
cpuBurst := app .Plan .CPUBurst
1133
+ planOverride := app .Plan .Override
1133
1134
1134
1135
if cpuBurst == nil {
1135
1136
cpuBurst = & appTypes.CPUBurst {}
1136
1137
}
1137
1138
1139
+ if planOverride == nil {
1140
+ planOverride = & appTypes.PlanOverride {}
1141
+ }
1142
+
1138
1143
if (cpuBurst .MaxAllowed != 0 ) &&
1139
- (app . Plan . Override .CPUBurst != nil ) &&
1140
- (* app . Plan . Override . CPUBurst > app . Plan . CPUBurst .MaxAllowed ) {
1144
+ (planOverride .CPUBurst != nil ) &&
1145
+ (* planOverride . CPUBurst > cpuBurst .MaxAllowed ) {
1141
1146
1142
1147
msg := fmt .Sprintf ("CPU burst exceeds the maximum allowed by plan %q" , app .Plan .Name )
1143
1148
return & tsuruErrors.ValidationError {Message : msg }
You can’t perform that action at this time.
0 commit comments