aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/import_export.py
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-07-11 14:17:50 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-07-11 14:17:50 -0700
commit44082b12d8a418bacd1ca5b19f7ce2595e07c1ee (patch)
tree1c252c5ea85df0ab142b0b4ae1a3d5b1ab6230db /mediagoblin/gmg_commands/import_export.py
parent3aeca53c85981fa46d61b41a7cf648d90637eb62 (diff)
downloadmediagoblin-44082b12d8a418bacd1ca5b19f7ce2595e07c1ee.tar.lz
mediagoblin-44082b12d8a418bacd1ca5b19f7ce2595e07c1ee.tar.xz
mediagoblin-44082b12d8a418bacd1ca5b19f7ce2595e07c1ee.zip
Patch by Strum. Ticket #451 - Convert all mongokit style .find, .find_one, .one calls over to SQLAlchemy queries
Diffstat (limited to 'mediagoblin/gmg_commands/import_export.py')
-rw-r--r--mediagoblin/gmg_commands/import_export.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/gmg_commands/import_export.py b/mediagoblin/gmg_commands/import_export.py
index d51a1e3e..98ec617d 100644
--- a/mediagoblin/gmg_commands/import_export.py
+++ b/mediagoblin/gmg_commands/import_export.py
@@ -63,7 +63,7 @@ def _import_media(db, args):
# TODO: Add import of queue files
queue_cache = BasicFileStorage(args._cache_path['queue'])
- for entry in db.MediaEntry.find():
+ for entry in db.MediaEntry.query.filter_by():
for name, path in entry.media_files.items():
_log.info('Importing: {0} - {1}'.format(
entry.title.encode('ascii', 'replace'),
@@ -204,7 +204,7 @@ def _export_media(db, args):
# TODO: Add export of queue files
queue_cache = BasicFileStorage(args._cache_path['queue'])
- for entry in db.MediaEntry.find():
+ for entry in db.MediaEntry.query.filter_by():
for name, path in entry.media_files.items():
_log.info(u'Exporting {0} - {1}'.format(
entry.title,