Follow-up from "Fix editing of scan execution policies"

The following discussion from !69249 (merged) should be addressed:

  • @pgascouvaillancourt started a discussion: (+1 comment)

    thought: Do we need to check type's value? I would imagine that knowing that it is defined should be sufficient 🤷

Implementation

diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/policy_editor.vue b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/policy_editor.vue
index 987c4eee7c16..e00b9aa6df03 100644
--- a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/policy_editor.vue
+++ b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/policy_editor.vue
@@ -34,17 +34,7 @@ export default {
   },
   computed: {
     isEditing() {
-      if (!this.existingPolicy) {
-        return false;
-      }
-
-      return Boolean(
-        this.existingPolicy.creation_timestamp ||
-          [
-            POLICY_TYPE_COMPONENT_OPTIONS.scanExecution.urlParameter,
-            POLICY_TYPE_COMPONENT_OPTIONS.scanResult?.urlParameter,
-          ].includes(this.existingPolicy.type),
-      );
+      return Boolean(this.existingPolicy);
     },
     policyTypes() {
       return Object.values(POLICY_TYPE_COMPONENT_OPTIONS);
Edited by Alexander Turinske