Changed uploads.py to do a transaction.rollback() when there is a DatabaseError type as this will hang postgres.