From 77d3ac403872290593c0157f2dea484ee333b008 Mon Sep 17 00:00:00 2001 From: James Kent Date: Tue, 14 Nov 2023 15:28:56 -0600 Subject: [PATCH] do not cascade with removal of base_study (#620) --- 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