projects
/
zzz-pokedex.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git@veekun.com:pokedex into HEAD
[zzz-pokedex.git]
/
pokedex
/
__init__.py
diff --git
a/pokedex/__init__.py
b/pokedex/__init__.py
index
6954149
..
8437ce4
100644
(file)
--- a/
pokedex/__init__.py
+++ b/
pokedex/__init__.py
@@
-142,7
+142,8
@@
def command_csvexport(engine_uri, directory='.'):
columns = [col.name for col in table.columns]
writer.writerow(columns)
columns = [col.name for col in table.columns]
writer.writerow(columns)
- for row in session.query(table).all():
+ primary_key = table.primary_key
+ for row in session.query(table).order_by(*primary_key).all():
csvs = []
for col in columns:
# Convert Pythony values to something more universal
csvs = []
for col in columns:
# Convert Pythony values to something more universal