Private
Public Access
1
0

adding apilog.log to gitignore

This commit is contained in:
Sander Roosendaal
2020-12-31 11:22:06 +01:00
parent a85d19c008
commit f8c44b3c3e
4 changed files with 20 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ from rowers.tasks import handle_calctrimp
from rowers.mailprocessing import send_confirm
import sys
import arrow
# Stroke data form to test API upload
@login_required()
@@ -262,7 +263,7 @@ def strokedatajson_v2(request,id):
unixtime = starttime+time
with open('apilog.log','a') as logfile:
logfile.write(str(starttime)+": ")
logfile.write(str(arrow.get(starttime).datetime)+": ")
logfile.write(request.user.username+"(strokedatajson_v2 POST - data parsed) \r\n")

View File

@@ -1717,7 +1717,7 @@ def workout_getimportview(request,externalid,source = 'c2'):
try:
notes = data['comments']
name = notes[:40]
except KeyError:
except (KeyError,TypeError):
comments = 'C2 Import Workout from {startdatetime}'.format(startdatetime=startdatetime)
name = notes