lib/pupa/models/person.rb in pupa-0.0.13 vs lib/pupa/models/person.rb in pupa-0.1.0

- old
+ new

@@ -27,14 +27,18 @@ end # @todo This will obviously need to be scoped as in Python Pupa, to a # jurisdiction, post, etc. def fingerprint - { - '$or' => [ - {'name' => name}, - {'other_names.name' => name}, - ], - } + if name + { + '$or' => [ + {'name' => name}, + {'other_names.name' => name}, + ], + } + else + {} + end end end end