okfn / ckanext-pdeu

Custom CKAN Extension for PublicData.eu
9 stars 4 forks source link

allow quoted dates in regex in before_index() #52

Closed joetsoi closed 11 years ago

joetsoi commented 11 years ago

ckan branch 381-convert-from-extras-quoting allows quotes round dates which means the regex here needs to allow them as well.

https://github.com/okfn/ckan/tree/381-convert-from-extras-quoting

seanh commented 11 years ago

Is there a bug here that can be reproduced, and this branch tested to see that if fixes the bug?

I'm not sure I understand the change, the regex is for parsing date strings from data publica, so this change would only be needed if datasets harvested from data publica have quotes around their date strings now. Is that what happens?

amercader commented 11 years ago

Note that after okfn/ckan#267 the whole data publica hack is no longer needed as all _date ending fields are handled at index time in core. So basically all your before_index method can go (if you are using latest core release-v2.0)

joetsoi commented 11 years ago

yeah I figured as much, the before_index method actually broke because it was only expecting data publica formats and crashed out on any other see c1d745654936a7a7dbf8e4d7987f76dcf1c58d6e