Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Commit

Permalink
Forgot to update this to the new VATUSA API format.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRomaa committed Apr 29, 2021
1 parent 31b478d commit 82c73e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/training/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def post_ctrs(session):
else:
response = requests.post(f'https://api.vatusa.net/v2/user/{session.student.cid}/training/record', data=data)

if response.json()['status'] == 'OK':
session.ctrs_id = response.json()['id']
if response.json().get('data').get('status') == 'OK':
session.ctrs_id = response.json().get('data').get('id')
session.save()


Expand Down

0 comments on commit 82c73e6

Please sign in to comment.