Skip to content
Snippets Groups Projects
Commit a560e3b4 authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

Catch a TypeError too along with KeyError

(There are cases where the dictionary var is actually None...)
parent 44b2030a
No related branches found
No related tags found
No related merge requests found
...@@ -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():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment