From ed0b981edc868046575d9e451077e79c7b0e4016 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 8 Aug 2014 09:50:16 -0500 Subject: [PATCH] If the constraint already exists, roll back to a sane state. --- mediagoblin/db/migrations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index a7e026c6..fca7819b 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -883,6 +883,6 @@ def revert_username_index(db): constraint.create() except ProgrammingError: # constraint already exists, no need to add - pass + db.rollback() db.commit() -- 2.25.1