Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Aug 5, 2019
1 parent 075f476 commit 1d1092f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions common/database_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def execute_query(self):

def get_count(self):
try:
return self.base_query.count()
return self.base_query.count()
finally:
self.execute_query()

Expand All @@ -59,19 +59,19 @@ def execute_query(self):

def get_single_result(self):
try:
result = self.base_query.first()
if result is not None:
return result
raise MissingRecordError(" No result found")
result = self.base_query.first()
if result is not None:
return result
raise MissingRecordError(" No result found")
finally:
self.session.close()

def get_all_results(self):
try:
results = self.base_query.all()
if results is not None:
return results
raise MissingRecordError(" No results found")
results = self.base_query.all()
if results is not None:
return results
raise MissingRecordError(" No results found")
finally:
self.session.close()

Expand Down

0 comments on commit 1d1092f

Please sign in to comment.