Permalink
Browse files

Made the migration detector use meta.local_fields instead of meta.fie…

…lds.

Refs #21010.

Thanks to Loïc for the patch.
  • Loading branch information...
1 parent 19e4374 commit 72479a29579f72a7713ac3c07eb92f5bafee25bd @bmispelon bmispelon committed Dec 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/migrations/autodetector.py
@@ -67,7 +67,7 @@ def _detect_changes(self):
model_state = self.to_state.models[app_label, model_name]
# Are there any relationships out from this model? if so, punt it to the next phase.
related_fields = []
- for field in new_app_cache.get_model(app_label, model_name)._meta.fields:
+ for field in new_app_cache.get_model(app_label, model_name)._meta.local_fields:
if field.rel:
if field.rel.to:
related_fields.append((field.name, field.rel.to._meta.app_label.lower(), field.rel.to._meta.object_name.lower()))

0 comments on commit 72479a2

Please sign in to comment.