incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [19/21] git commit: [#4299] ticket:293 Prevent exception on ticket creation
Date Fri, 22 Mar 2013 22:54:46 GMT
[#4299] ticket:293 Prevent exception on ticket creation


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d7b357ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d7b357ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d7b357ac

Branch: refs/heads/master
Commit: d7b357acefafac1f2b2a5d21501dacb42449970a
Parents: d5861f7
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Thu Mar 14 15:09:57 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Fri Mar 22 21:55:17 2013 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/widgets/ticket_form.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d7b357ac/ForgeTracker/forgetracker/widgets/ticket_form.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/widgets/ticket_form.py b/ForgeTracker/forgetracker/widgets/ticket_form.py
index 1334b37..465dce5 100644
--- a/ForgeTracker/forgetracker/widgets/ticket_form.py
+++ b/ForgeTracker/forgetracker/widgets/ticket_form.py
@@ -47,8 +47,9 @@ class GenericTicketForm(ew.SimpleForm):
             self._add_current_value_to_user_field(field, ctx.get('value'))
         elif idx == 'custom_fields':
             for cf in c.app.globals.custom_fields:
-                if cf.type == 'user':
-                    user = ctx.get('value', {}).get(cf.name)
+                if cf and cf.type == 'user':
+                    val = ctx.get('value')
+                    user = val.get(cf.name) if val else None
                     for f in field.fields:
                         if f.name == cf.name:
                             self._add_current_value_to_user_field(f, user)


Mime
View raw message