4teamwork / ftw.solr

Solr integration for Plone
5 stars 5 forks source link

Make updates_in_post_commit_enabled() helper more robust: #193

Closed lukasgraf closed 1 year ago

lukasgraf commented 1 year ago

In situations where a Plone site doesn't exist yet (e.g. when attempting to purge Solr during Plone site setup), there won't be a Plone registry, and queryUtility(IRegistry) will return None, and the updates_in_post_commit_enabled() helper will fail.

This change fixes this by returning True (the settings interface's default) in this case.

(Fixes an issue where a GEVER can't be set up locally with the [ ] Purge Solr flag any more)

njohner commented 1 year ago

🎉 Thanks