aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r--mediagoblin/db/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index 10e0c33f..2f58503f 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -145,6 +145,7 @@ class MediaEntry(Base, MediaEntryMixin):
)
attachment_files_helper = relationship("MediaAttachmentFile",
+ cascade="all, delete-orphan",
order_by="MediaAttachmentFile.created"
)
attachment_files = association_proxy("attachment_files_helper", "dict_view",