From 7dcf6bce88b953589a96531e48d1e783dacac450 Mon Sep 17 00:00:00 2001 From: James Kent Date: Tue, 14 Nov 2023 15:16:48 -0600 Subject: [PATCH] do not cascade with removal of base_study --- store/neurostore/models/data.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/store/neurostore/models/data.py b/store/neurostore/models/data.py index 0879edb7b..da23f355f 100644 --- a/store/neurostore/models/data.py +++ b/store/neurostore/models/data.py @@ -150,8 +150,7 @@ class BaseStudy(BaseMixin, db.Model): user = relationship("User", backref=backref("base_studies")) # retrieve versions of same study versions = relationship( - "Study", backref=backref("base_study"), cascade="all, delete-orphan" - ) + "Study", backref=backref("base_study")) def update_has_images_and_points(self): # Calculate has_images and has_coordinates for the BaseStudy