Skip to content

Commit

Permalink
remove non-working solution
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkent committed Jun 11, 2024
1 parent 401eadf commit 1c0f880
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions store/neurostore/models/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,19 +378,6 @@ class Analysis(BaseMixin, db.Model):
cascade_backrefs=False,
)

def save(self):
if self.study_id is not None:
max_order = (
db.session.query(func.max(Analysis.order))
.filter_by(study_id=self.study_id)
.scalar()
)
self.order = 1 if max_order is None else max_order + 1
else:
self.order = 1

super().save()


class Condition(BaseMixin, db.Model):
__tablename__ = "conditions"
Expand Down Expand Up @@ -509,18 +496,6 @@ def coordinates(cls):
user_id = db.Column(db.Text, db.ForeignKey("users.external_id"), index=True)
user = relationship("User", backref=backref("points", passive_deletes=True))

def save(self):
if self.analysis_id is not None:
max_order = (
db.session.query(func.max(Point.order))
.filter_by(analysis_id=self.analysis_id)
.scalar()
)
self.order = 1 if max_order is None else max_order + 1
else:
self.order = 1
super().save()


class Image(BaseMixin, db.Model):
__tablename__ = "images"
Expand Down

0 comments on commit 1c0f880

Please sign in to comment.