Update database.py
Update database.py

Inverted logic means _release_internal will always fail on a rollback. Fixed and simplified.
stefanw/dataset,reubano/dataset,vguzmanp/dataset,saimn/dataset,askebos/dataset,pudo/dataset,twds/dataset