Cannot cancel planned transfers
When cancelling a PLANNED
transfer via the REST interface, the following error pops up:
2021/02/03 13:03:50 [CRITICAL] Admin: Failed to create new history entry: the transfer's end date cannot be anterior to the start date
As the error says, this is due to the fact that, when cancelling a transfer, the transfer's end date is set to the current time. However, since the transfer hasn't started yet, this means that the end date is anterior to the start date, which is forbidden by the database validator. Thus the cancel will always fail because the database refuses the new history entry.
A solution to this problem would be to allow the transfer_history
end_date
column to be null, which would actually make more sense since cancelled transfers technically did not end (and thus should not have an "end" date).