Op Timer API: woops I made the default duration 60 hrs not 60 mins HEH

This commit is contained in:
Aaron Static
2010-07-01 23:04:30 +10:00
parent 97c6f8f9bb
commit 5bcc03be6d

View File

@@ -125,7 +125,7 @@ class OpTimerHandler(BaseHandler):
params = {'userID':obj.id,'apiKey':obj.api_key,'characterID':FULL_API_CHARACTER_ID}
cached_doc = CachedDocument.objects.api_query('/char/UpcomingCalendarEvents.xml.aspx', params, exceptions=False)
print cached_doc.body
dom = minidom.parseString(cached_doc.body.encode('utf-8'))
enode = dom.getElementsByTagName('error')
if enode:
@@ -155,7 +155,7 @@ class OpTimerHandler(BaseHandler):
duration = int(node.getAttribute('duration'))
#In case people forget to set a duration, we'll give a default of 1 hour
if duration == 0:
duration = 3600
duration = 60
endsIn = startsIn + (duration * 60)
if startsIn < 0:
startsIn = 0