Skip to content

Commit

Permalink
Merge branch 'master' into Simple-Connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Scratchcat1 authored Oct 22, 2017
2 parents ebbcbc0 + a94f8e4 commit d7c230d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AATC_DB.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ def MarkFlightComplete(self,DroneID,FlightID,Code):
return False,"You do not have permission to mark this flight complete"

def GetCompletedFlightIDs(self,EndTimeThreshold):
print((EndTimeThreshold+GetTime(),EndTimeThreshold*3+GetTime(),GetTime()))
self.cur.execute("SELECT FlightID FROM Flight WHERE (Completed > 0 AND (EndTime + %s) < %s) OR (EndTime+ %s) < %s",(EndTimeThreshold,GetTime(),EndTimeThreshold*3,GetTime()))
return True,"['FlightID']",self.cur.fetchall()

Expand Down Expand Up @@ -308,11 +307,12 @@ def GetMonitorFlightWaypoints(self,MonitorID):

def GetMonitorID(self,MonitorName):
self.cur.execute("SELECT MonitorID FROM Monitor WHERE MonitorName = %s",(MonitorName,))
if len(self.cur.fetchall()) != 0:
result = self.cur.fetchall()
if len(result) != 0:
Sucess = True
else:
Sucess = False
return Sucess,"['MonitorID']",self.cur.fetchall()
return Sucess,"['MonitorID']",result
def GetMonitorName(self,MonitorID):
self.cur.execute("SELECT MonitorName FROM Monitor WHERE MonitorID = %s",(MonitorID,))
return True,"['MonitorName']",self.cur.fetchall()
Expand Down

0 comments on commit d7c230d

Please sign in to comment.