Private
Public Access
1
0

checking in changes

This commit is contained in:
Sander Roosendaal
2020-02-08 10:20:32 +01:00
parent 6bdf9216f2
commit e515141429
6 changed files with 41 additions and 19 deletions

View File

@@ -347,6 +347,9 @@ def get_user_by_userid(*args,**kwargs):
except KeyError:
id = request.user.id
if id is not None and int(id) == 0:
id = request.user.id
u = get_object_or_404(User,pk=id)
return u
@@ -370,6 +373,9 @@ def getrequestrower(request,rowerid=0,userid=0,notpermanent=False):
userid = int(userid)
rowerid = int(rowerid)
if userid == 0:
userid = request.user.id
if notpermanent == False:
if rowerid == 0 and 'rowerid' in request.session:
rowerid = request.session['rowerid']
@@ -977,10 +983,10 @@ def rowhascoordinates(row):
def rdata(file,rower=rrower()):
try:
res = rrdata(csvfile=file,rower=rower)
except (IOError, IndexError, EOFError):
except (IOError, IndexError, EOFError,FileNotFoundError):
try:
res = rrdata(csvfile=file+'.gz',rower=rower)
except (IOError, IndexError, EOFError):
except (IOError, IndexError, EOFError,FileNotFoundError):
res = 0
return res