Fix media display for no media_data row in sql.
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Thu, 15 Mar 2012 11:35:58 +0000 (12:35 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Thu, 15 Mar 2012 11:35:58 +0000 (12:35 +0100)
commit729424befd80ed34d486cf995499ce7a8bd0806f
tree2c2858bd9217cd35a8badfd23fcf6eddf4066591
parent007ac2e72075b730719cab4e6b3af5d03f6f9473
Fix media display for no media_data row in sql.

If there is no media_data row for the current media (for
whatever reason, there might be good ones), let
MediaEntry.media_data not raise an exception but just
return None.

The exif display part now handles this by checking whether
.media_data.exif is defined (None has no attribute exif, so
it's undefined, all fine).
mediagoblin/db/sql/models.py
mediagoblin/templates/mediagoblin/utils/exif.html