Created
July 9, 2012 06:42
-
-
Save imankulov/3074650 to your computer and use it in GitHub Desktop.
django-celery patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/djcelery/migrations/0002_v25_changes.py b/djcelery/migrations/0002_v25_changes.py | |
index f3bb729..7013f7f 100644 | |
--- a/djcelery/migrations/0002_v25_changes.py | |
+++ b/djcelery/migrations/0002_v25_changes.py | |
@@ -11,6 +11,10 @@ def ignore_exists(fun, *args, **kwargs): | |
fun(*args, **kwargs) | |
except DatabaseError, exc: | |
if "exists" in str(exc): | |
+ # don't panic, everything is okay, it's just a hack | |
+ if db.has_ddl_transactions: | |
+ db.rollback_transaction() | |
+ db.start_transaction() | |
return False | |
raise | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment