diff options
| author | Alban Peignier | 2018-03-05 23:03:31 +0100 | 
|---|---|---|
| committer | Alban Peignier | 2018-03-05 23:03:31 +0100 | 
| commit | cfdd12aa6b46331435bc62209c51cc14f470bd38 (patch) | |
| tree | 0ccd14ebd568790d936915afc29bad58f0140c40 | |
| parent | dd11d9c45ea1ceb473f450224ebf6345922a7325 (diff) | |
| download | chouette-core-cfdd12aa6b46331435bc62209c51cc14f470bd38.tar.bz2 | |
Returns nil value into SimpleExporter#resolve_value when one of the attributes in the chain is nil. Refs #6068
| -rw-r--r-- | app/models/simple_exporter.rb | 3 | 
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? | 
