harvard-lil / h2o

H2O is a web app for creating and reading open educational resources, primarily in the legal field
https://opencasebook.org
GNU Affero General Public License v3.0
36 stars 30 forks source link

Pull from legal document source logic is missing a check on updated date #2004

Closed lizadaly closed 1 year ago

lizadaly commented 1 year ago

Changes introduced in #1956 were missing a key logic step: after checking whether a local copy of a legal document was "old" (more than a year since it was created), the copy retrieved from upstream should have been further checked whether it was more recent than the local copy before a new version was created. Instead it is always creating a new version.

There are utility functions to check this that should be used here and there should be test coverage to assert this is fixed.

lizadaly commented 1 year ago

After further investigation, we decided the desired behavior here was to never update (create a new copy) of an existing LegalDocument.