summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-06-17 22:12:31 -0700
committerAndrew Godwin <andrew@aeracode.org>2014-06-17 22:12:31 -0700
commit09b63a7ccee85566dbe6dd476b507e8c310e8092 (patch)
treeaf04cbd5b28ab0469f55787f31c9f671453860c9 /django
parent405b9dcd8b16fe923e1d4beadc8bb05906eaf7d5 (diff)
Fix __latest__ to actually resolve to the latest migration
Diffstat (limited to 'django')
-rw-r--r--django/db/migrations/loader.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
index 26047b3a85..86987db02c 100644
--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -155,7 +155,7 @@ class MigrationLoader(object):
if key[1] == "__first__":
return list(self.graph.root_nodes(key[0]))[0]
else:
- return list(self.graph.root_nodes(key[0]))[-1]
+ return list(self.graph.leaf_nodes(key[0]))[0]
except IndexError:
if self.ignore_no_migrations:
return None