Skip to content

Commit eec21b3

Browse files
committedNov 28, 2012
Field.get_value should not raise exception if followed attribute returns None
1 parent 497cbcd commit eec21b3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎import_export/fields.py

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def get_value(self, obj):
6464
repr(value), attr)
6565
raise exceptions.FieldError(msg)
6666
value = getattr(value, attr)
67+
if value is None:
68+
return None
6769

6870
if callable(value):
6971
value = value()

0 commit comments

Comments
 (0)
Please sign in to comment.