Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Analytic Structure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo modules
Analytic Structure
Commits
a560e3b4
Commit
a560e3b4
authored
7 years ago
by
Houzefa Abbasbhay
Browse files
Options
Downloads
Patches
Plain Diff
Catch a TypeError too along with KeyError
(There are cases where the dictionary var is actually None...)
parent
44b2030a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
analytic_structure.py
+3
-1
3 additions, 1 deletion
analytic_structure.py
with
3 additions
and
1 deletion
analytic_structure.py
+
3
−
1
View file @
a560e3b4
...
@@ -253,7 +253,9 @@
...
@@ -253,7 +253,9 @@
try
:
try
:
field_subviews
=
field
[
'
views
'
]
field_subviews
=
field
[
'
views
'
]
except
KeyError
:
# Catch TypeError too in case "field" is None...
except
(
KeyError
,
TypeError
):
return
field
return
field
for
view_mode
,
subview
in
field_subviews
.
iteritems
():
for
view_mode
,
subview
in
field_subviews
.
iteritems
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment