You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2020/06/23 22:19:48 UTC

[airavata-django-portal] 01/02: AIRAVATA-3340 Fix issue with queue default overwriting saved values

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 3c28e4297063b633c5f80cad66bc9cfdc0c23e5c
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jun 23 18:17:42 2020 -0400

    AIRAVATA-3340 Fix issue with queue default overwriting saved values
---
 .../js/components/experiment/QueueSettingsEditor.vue         | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue
index e50a3f0..b5527d7 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue
@@ -377,12 +377,18 @@ export default {
       this.loadAppDeploymentQueues().then(() => this.setDefaultQueue());
     },
     // If the default queue changes, re-set queue defaults
-    defaultQueue() {
-      this.setDefaultQueue();
+    defaultQueue(value, oldValue) {
+      // Only set defaultQueue if it changes from a non-null value to some
+      // different non-null value (initially it is null when data is loading)
+      if (oldValue && value !== oldValue) {
+        this.setDefaultQueue();
+      }
     },
     // If batch queue resource policy for the default queue changes, re-set queue defaults
     defaultQueueBatchQueueResourcePolicy(newValue, oldValue) {
-      if (newValue !== oldValue) {
+      // Only set defaultQueue if it changes from a non-null value to some
+      // different non-null value (initially it is null when data is loading)
+      if (oldValue && newValue !== oldValue) {
         this.setDefaultQueue();
       }
     }