Skip to content

Commit

Permalink
[FIX] Statement Error in Connection fool
Browse files Browse the repository at this point in the history
  • Loading branch information
mallycrip committed Apr 8, 2021
1 parent 32e124d commit 3f7fe48
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def find_all_by_status_and_term(self, status: str, start_time: str, end_time: in
.filter(Outing.status == func.binary(status))
.filter(and_(Outing.start_time >= generated_start_time,
Outing.start_time <= generated_end_time)).all())
self.sql._db_session.commit()
self.sql._db_session.close()
return model

@trace_service("SQL (find)", open_tracing)
Expand All @@ -90,5 +92,6 @@ def find_all_by_student_uuid_and_status_and_term(
.filter(Outing.student_uuid == func.binary(student_uuid))
.filter(and_(Outing.start_time >= generated_start_time,
Outing.start_time <= generated_end_time)).all())

self.sql._db_session.commit()
self.sql._db_session.close()
return model

0 comments on commit 3f7fe48

Please sign in to comment.