aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/simple_exporter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/simple_exporter.rb b/app/models/simple_exporter.rb
index d396419d2..c1ba75d0a 100644
--- a/app/models/simple_exporter.rb
+++ b/app/models/simple_exporter.rb
@@ -1,3 +1,4 @@
+# coding: utf-8
class SimpleExporter < SimpleInterface
def export opts={}
configuration.validate!
@@ -80,7 +81,7 @@ class SimpleExporter < SimpleInterface
val = instance_exec(scoped_item, &val)
else
attributes = [col.attribute].flatten
- val = attributes.inject(scoped_item){|tmp, attr| tmp.send(attr)}
+ val = attributes.inject(scoped_item){|tmp, attr| tmp.send(attr) if tmp }
end
end
if val.nil? && !col.omit_nil?