irma-frontend
irma-frontend copied to clipboard
Possible race condition with hashes
To reproduce: ask for multiple scans with the same hash at the same time (using the API).
The code ends on an error raised by load_from_sha256, because there are several entries in File (in DB) for the same hash...
Maybe related: there is no unique constraint on hash fields in the database, but the case is already considered through the MultipleResultsFound exception catch.
for reproducing you are scanning multiple times the same files ? (through irma-cli test i guess)
We are talking to the REST API, asking to do several different scans containing the same files, but with a "re-scan" enforcement.