diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-03-03 14:29:30 -0600 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-03-03 14:29:30 -0600 |
commit | 4f239ff19418a48fa4d369efb005abfc09593359 (patch) | |
tree | e91b76353fb3e080b59648baa76992df4b31d8c6 | |
parent | 9d4cebfd36b7bba3d8d4ad2cb97a85ec63068cb5 (diff) | |
download | mediagoblin-4f239ff19418a48fa4d369efb005abfc09593359.tar.lz mediagoblin-4f239ff19418a48fa4d369efb005abfc09593359.tar.xz mediagoblin-4f239ff19418a48fa4d369efb005abfc09593359.zip |
Another elrond suggestion: only init orig_metadata if there's anything in the dict.
This commit sponsored by Joshua Rosen. Thank you!
-rw-r--r-- | mediagoblin/media_types/video/processing.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mediagoblin/media_types/video/processing.py b/mediagoblin/media_types/video/processing.py index ec9ff225..3da19a08 100644 --- a/mediagoblin/media_types/video/processing.py +++ b/mediagoblin/media_types/video/processing.py @@ -178,5 +178,7 @@ def store_metadata(media_entry, metadata): videorate = metadata["videorate"] stored_metadata["videorate"] = [videorate.num, videorate.denom] - media_entry.media_data_init( - orig_metadata=stored_metadata) + # Only save this field if there's something to save + if len(stored_metadata): + media_entry.media_data_init( + orig_metadata=stored_metadata) |