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


The following commit(s) were added to refs/heads/develop by this push:
     new ec94eb18 AIRAVATA-3663 Display button for proceeding to the dashboard 
after completing profile
ec94eb18 is described below

commit ec94eb187c5364225aaaf49bbd7653e22c60794c
Author: Marcus Christie <[email protected]>
AuthorDate: Thu Oct 27 12:27:40 2022 -0400

    AIRAVATA-3663 Display button for proceeding to the dashboard after 
completing profile
---
 .../js/containers/UserProfileContainer.vue                 | 14 ++++++++------
 django_airavata/apps/auth/views.py                         |  5 ++---
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git 
a/django_airavata/apps/auth/static/django_airavata_auth/js/containers/UserProfileContainer.vue
 
b/django_airavata/apps/auth/static/django_airavata_auth/js/containers/UserProfileContainer.vue
index c70772c4..3467781e 100644
--- 
a/django_airavata/apps/auth/static/django_airavata_auth/js/containers/UserProfileContainer.vue
+++ 
b/django_airavata/apps/auth/static/django_airavata_auth/js/containers/UserProfileContainer.vue
@@ -31,13 +31,13 @@
       </template>
 
       <b-button variant="primary" @click="onSave">Save</b-button>
+      <b-button
+        variant="success"
+        v-if="!mustComplete"
+        href="/workspace/dashboard"
+        >Go to Dashboard</b-button
+      >
     </b-card>
-    <b-link
-      v-if="!mustComplete"
-      class="text-muted small"
-      href="/workspace/dashboard"
-      >Return to Dashboard</b-link
-    >
   </div>
 </template>
 
@@ -102,6 +102,8 @@ export default {
       ) {
         await this.updateUser();
         await this.saveExtendedUserProfileValues();
+        // Reload current user to get updated 'complete' and 
'ext_user_profile_valid'
+        await this.loadCurrentUser();
         notifications.NotificationList.add(
           new notifications.Notification({
             type: "SUCCESS",
diff --git a/django_airavata/apps/auth/views.py 
b/django_airavata/apps/auth/views.py
index ad6cd0b6..0f93678b 100644
--- a/django_airavata/apps/auth/views.py
+++ b/django_airavata/apps/auth/views.py
@@ -770,11 +770,10 @@ class 
ExtendedUserProfileValueViewset(mixins.CreateModelMixin,
 
     def get_queryset(self):
         user = self.request.user
-        if self.request.is_gateway_admin:
+        if self.request.is_gateway_admin and 
self.request.query_params.get('username'):
             queryset = models.ExtendedUserProfileValue.objects.all()
             username = self.request.query_params.get('username')
-            if username is not None:
-                queryset = 
queryset.filter(user_profile__user__username=username)
+            queryset = queryset.filter(user_profile__user__username=username)
         else:
             queryset = user.user_profile.extended_profile_values.all()
         return queryset

Reply via email to