From: Elrond Date: Tue, 20 Mar 2012 22:55:28 +0000 (+0100) Subject: More standard media_data model for ascii. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8fd81053b48f02d16340e2e82f6c43bbffc05ce8;p=mediagoblin.git More standard media_data model for ascii. ascii doesn't use media_data at all. So it needs the most basic media_data model. Fix it to take the current form. --- diff --git a/mediagoblin/media_types/ascii/models.py b/mediagoblin/media_types/ascii/models.py index 043a858a..a35e6958 100644 --- a/mediagoblin/media_types/ascii/models.py +++ b/mediagoblin/media_types/ascii/models.py @@ -25,9 +25,9 @@ from sqlalchemy import ( class AsciiData(Base): __tablename__ = "ascii__mediadata" - id = Column(Integer, primary_key=True) - media_entry = Column( - Integer, ForeignKey('core__media_entries.id'), nullable=False) + # The primary key *and* reference to the main media_entry + media_entry = Column(Integer, ForeignKey('core__media_entries.id'), + primary_key=True) DATA_MODEL = AsciiData