aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/models.py
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-08-21 14:37:44 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-08-21 14:44:18 -0700
commite2b56345498f248ad75d646def13ad068f17226c (patch)
treea4d7a635535bd39c9a296500b07cca0864222ded /mediagoblin/db/models.py
parente002452f911c366756bf93e19238cc26bc835d09 (diff)
downloadmediagoblin-e2b56345498f248ad75d646def13ad068f17226c.tar.lz
mediagoblin-e2b56345498f248ad75d646def13ad068f17226c.tar.xz
mediagoblin-e2b56345498f248ad75d646def13ad068f17226c.zip
skip image resizing if possible
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r--mediagoblin/db/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index aa0c54d3..ca280b30 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -269,7 +269,7 @@ class MediaEntry(Base, MediaEntryMixin):
return the value of the key.
"""
media_file = MediaFile.query.filter_by(media_entry=self.id,
- name=file_key).first()
+ name=unicode(file_key)).first()
if media_file:
if metadata_key:
@@ -282,7 +282,7 @@ class MediaEntry(Base, MediaEntryMixin):
Update the file_metadata of a MediaFile.
"""
media_file = MediaFile.query.filter_by(media_entry=self.id,
- name=file_key).first()
+ name=unicode(file_key)).first()
file_metadata = media_file.file_metadata or {}