From 353a25bf5e0c33dabbe7fea2fed993d5744e22f2 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 10 Aug 2011 11:27:20 +0100 Subject: [PATCH] Switch to oldstyle Optimer API endpoint --- app/api/handlers/oauth.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/api/handlers/oauth.py b/app/api/handlers/oauth.py index 27e121d..742bfbb 100644 --- a/app/api/handlers/oauth.py +++ b/app/api/handlers/oauth.py @@ -37,10 +37,7 @@ class OAuthOpTimerHandler(BaseHandler): def read(self, request, id=None): - objs = EVEAccount.objects.filter(user=request.user, api_keytype=API_KEYTYPE_FULL) - - if not objs.count(): - objs = [get_object_or_404(EVEAccount, pk=settings.FULL_API_USER_ID)] + objs = [get_object_or_404(EVEAccount, pk=settings.FULL_API_USER_ID)] events = [] for obj in objs: @@ -93,12 +90,12 @@ class OAuthOpTimerHandler(BaseHandler): if len(events) == 0: return {'ops':[{ 'startsIn': -1, - 'eventID': 0, + 'eventID': '0', 'ownerName': '', 'eventDate': '', 'eventTitle': '
No ops are currently scheduled
', 'duration': 0, - 'isImportant': 0, + 'isImportant': '0', 'eventText': 'Add ops using EVE-Gate or the in-game calendar', 'endsIn':-1, 'forumLink': ''}]}