From commits-return-19849-archive-asf-public=cust-asf.ponee.io@airavata.apache.org Wed Oct 10 22:38:41 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4FCA4180672 for ; Wed, 10 Oct 2018 22:38:41 +0200 (CEST) Received: (qmail 92381 invoked by uid 500); 10 Oct 2018 20:38:40 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 92372 invoked by uid 99); 10 Oct 2018 20:38:40 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2018 20:38:40 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D4AFC808B6; Wed, 10 Oct 2018 20:38:39 +0000 (UTC) Date: Wed, 10 Oct 2018 20:38:39 +0000 To: "commits@airavata.apache.org" Subject: [airavata-django-portal] branch master updated: Bug fix: check if there is a resolver_match first MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <153920391982.7052.12159949000119001090@gitbox.apache.org> From: machristie@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: airavata-django-portal X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: f62a8c94029a3e0885c5e7b71a9ad5b94d595e90 X-Git-Newrev: 62493fa926d94dd960893876d8b7296477a0b1ae X-Git-Rev: 62493fa926d94dd960893876d8b7296477a0b1ae X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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 {