airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] branch master updated: Bug fix: check if there is a resolver_match first
Date Wed, 10 Oct 2018 20:38:39 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 62493fa  Bug fix: check if there is a resolver_match first
62493fa is described below

commit 62493fa926d94dd960893876d8b7296477a0b1ae
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Wed Oct 10 16:38:15 2018 -0400

    Bug fix: check if there is a resolver_match first
---
 django_airavata/context_processors.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/django_airavata/context_processors.py b/django_airavata/context_processors.py
index f1ad0fc..117cafe 100644
--- a/django_airavata/context_processors.py
+++ b/django_airavata/context_processors.py
@@ -12,7 +12,9 @@ def airavata_app_registry(request):
         key=lambda app: "{:09}-{}".format(app.app_order,
                                           app.verbose_name.lower()))
     current_airavata_app = [
-        app for app in airavata_apps if app.url_app_name == request.resolver_match.app_name]
+        app for app in airavata_apps
+        if request.resolver_match and
+        app.url_app_name == request.resolver_match.app_name]
     current_airavata_app = current_airavata_app[0]\
         if len(current_airavata_app) > 0 else None
     return {


Mime
View raw message