This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 7682d06  WHIMSY-370 Family first check box is unreliable
7682d06 is described below

commit 7682d060cec89772758b13e6b0af8b65c555b7e6
Author: Sebb <[email protected]>
AuthorDate: Fri Oct 15 16:58:15 2021 +0100

    WHIMSY-370 Family first check box is unreliable
---
 www/secretary/iclaparser.rb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/www/secretary/iclaparser.rb b/www/secretary/iclaparser.rb
index 3cf65ec..ab61db8 100644
--- a/www/secretary/iclaparser.rb
+++ b/www/secretary/iclaparser.rb
@@ -192,7 +192,13 @@ module ICLAParser
                 debug[key] = v.inspect
                 val = encode(val)
                 if val.length > 0
-                  data[canon_field_name(key)] = val
+                  ckey = canon_field_name(key)
+                  if ckey == :FamilyFirst # convert the value to true/false
+                    # PDFs seem to use Yes and Off; also allow for On
+                    data[ckey] = %w(Yes On).include? val # default to false
+                  else
+                    data[ckey] = val
+                  end
                 end
                 metadata[:dataSource]['Form'] = true
               end

Reply via email to