From 8fd81053b48f02d16340e2e82f6c43bbffc05ce8 Mon Sep 17 00:00:00 2001 From: Elrond Date: Tue, 20 Mar 2012 23:55:28 +0100 Subject: [PATCH] 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. --- mediagoblin/media_types/ascii/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.25.1