From: Elrond Date: Sat, 18 Feb 2012 21:20:32 +0000 (+0100) Subject: Create a fake MediaEntry.media_data for sql X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5fe1fd072226b0d0ba010529e9ab20b5d227d604;p=mediagoblin.git Create a fake MediaEntry.media_data for sql So that the SQL backend is more useable, let the MediaEntry have a faked media_data. It's extremely fake: The returned dict is always a new one. So any stored info is even lost! --- diff --git a/mediagoblin/db/sql/models.py b/mediagoblin/db/sql/models.py index b52eac76..8ae32c63 100644 --- a/mediagoblin/db/sql/models.py +++ b/mediagoblin/db/sql/models.py @@ -167,6 +167,11 @@ class MediaEntry(Base, MediaEntryMixin): if media is not None: return media.url_for_self(urlgen) + @property + def media_data(self): + # TODO: Replace with proper code to read the correct table + return {} + class MediaFile(Base): """