Skip to content

Commit

Permalink
database connection close
Browse files Browse the repository at this point in the history
  • Loading branch information
softpeanut committed Apr 21, 2022
1 parent fcfb1cd commit 881834e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Server/app/model/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ class BaseMixin:
def save(self):
db.session.add(self)
db.session.commit()
db.session.remove()
return self

def delete(self):
db.session.delete(self)
db.session.commit()
db.session.remove()

@staticmethod
def kst_now():
Expand Down

0 comments on commit 881834e

Please sign in to comment.