Fix: fix panic when user disable create apprevision

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
This commit is contained in:
yangsoon
2022-02-14 16:16:00 +08:00
parent 7523576905
commit fb0983041d
@@ -370,7 +370,7 @@ func ComputeAppRevisionHash(appRevision *v1beta1.ApplicationRevision) (string, e
// currentAppRevIsNew check application revision already exist or not
func (h *AppHandler) currentAppRevIsNew(ctx context.Context) (bool, bool, error) {
// the last revision doesn't exist.
if h.app.Status.LatestRevision == nil {
if h.app.Status.LatestRevision == nil || DisableAllApplicationRevision {
return true, true, nil
}