Created
September 26, 2014 16:47
-
-
Save loic/51d82cb820c1feb9505a to your computer and use it in GitHub Desktop.
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/django/db/migrations/writer.py b/django/db/migrations/writer.py | |
index 9709eec..e5e9f7a 100644 | |
--- a/django/db/migrations/writer.py | |
+++ b/django/db/migrations/writer.py | |
@@ -352,7 +352,7 @@ class MigrationWriter(object): | |
return string, set(imports) | |
if hasattr(value, "__module__"): | |
module = value.__module__ | |
- if module == 'builtins' if six.PY3 else '__builtin__': | |
+ if module == ('builtins' if six.PY3 else '__builtin__'): | |
return value.__name__, set() | |
else: | |
return "%s.%s" % (module, value.__name__), set(["import %s" % module]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment