Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling of empty TEI or CSV entries #192

Open
karindalziel opened this issue Apr 14, 2022 · 2 comments
Open

Better handling of empty TEI or CSV entries #192

karindalziel opened this issue Apr 14, 2022 · 2 comments

Comments

@karindalziel
Copy link
Member

karindalziel commented Apr 14, 2022

sometimes a TEI element is blank, and sometimes there's an inadvertent space in a spreadsheet. When that happens we get a "No Label" entry on the orchid side

a better default would probably be to look for empty items (once all newlines, spaces, and tabs are stripped out) and then post.

We could use active support and the .blank? method, but I have a function to do it as well:

 def empty_post(field)
    unless field.to_s.strip.empty?
      field
    end
  end
@wkdewey
Copy link
Contributor

wkdewey commented May 10, 2022

This also came up with Habeas Corpus, some entries were coming up as "-".

@wkdewey wkdewey added this to the Habeas Release milestone May 10, 2022
@wkdewey
Copy link
Contributor

wkdewey commented Oct 17, 2022

I addressed this by changing the get_text and get_list methods (which use Nokogiri to query the XML) to return nil instead of blank when the xpath does not match. However, this still requires nil checks in the data repos and is a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants