1
0
mirror of https://github.com/linkedin/oncall.git synced 2025-11-30 23:44:59 +02:00

Fix flake8 errors

This commit is contained in:
Daniel Wang
2018-06-19 13:39:51 -07:00
committed by Daniel Wang
parent a92d87f8fa
commit 8324d2c552
2 changed files with 3 additions and 3 deletions

View File

@@ -161,7 +161,7 @@ def authenticate_application(auth_token, req):
if is_client_digest_valid(client_digest, api_key, window, method, path, body):
req.context['app'] = app_name
return
elif is_client_digest_valid(client_digest, api_key, window-1, method, path, body):
elif is_client_digest_valid(client_digest, api_key, window - 1, method, path, body):
req.context['app'] = app_name
return
else:

View File

@@ -13,8 +13,8 @@ class Scheduler(default.Scheduler):
(SELECT `user_id`, MAX(`start`) AS `last_start` FROM `event`
WHERE `team_id` = %s AND `user_id` IN %s AND `start` <= %s
AND `role_id` = %s
GROUP BY `user_id`
ORDER BY `last_start` DESC) t
GROUP BY `user_id`
ORDER BY `last_start` DESC) t
LIMIT 1
''', (schedule['team_id'], roster, start, schedule['role_id']))
if cursor.rowcount != 0: