checking in changes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user