systopia / de.systopia.contract

Contracts extension
GNU Affero General Public License v3.0
0 stars 4 forks source link

Update Contract via API may not be in the past #76

Closed jojowork closed 1 year ago

jojowork commented 1 year ago

We are using the API of the contract extension to update contracts via Forms. If a user transmits a date in the past the update contract request is rejected. But there are cases where a user transmits the form close to midnight an the API receives the date right after midnight. In this case the request is also rejected. But in this case the request should be considered as valid.

I propose to add a condition like: if the transmitted date is only 1 day in the past - then adjust the date to now 00:00:00

this could also be verified with a unit test