From 9394ea05a495f4475fc71727cef4c0bf0a6b30a2 Mon Sep 17 00:00:00 2001 From: Cody Jackson Date: Thu, 18 Feb 2021 12:15:29 -0700 Subject: [PATCH] Enable models to override their cleanForNew method Constraints were failing to clone because cleanForNew didn't remove `this.constraint` which casued the save method to attempt to save the existing constraint instead of creating a new constraint. This enables models to be able to create their own cleanForNew method to remove custom props if necessary. rancher/dashboard#2341 --- components/ResourceDetail/index.vue | 3 +-- models/constraints.gatekeeper.sh.constraint.js | 10 ++++++++++ plugins/steve/resource-instance.js | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/components/ResourceDetail/index.vue b/components/ResourceDetail/index.vue index bcbd57188a..b29b06e583 100644 --- a/components/ResourceDetail/index.vue +++ b/components/ResourceDetail/index.vue @@ -1,5 +1,4 @@