stats DF empty behavior
This commit is contained in:
@@ -3973,7 +3973,35 @@ def cumstats(request,theuser=0,
|
|||||||
|
|
||||||
|
|
||||||
if datadf.empty:
|
if datadf.empty:
|
||||||
return HttpResponse("No data found")
|
stats = {}
|
||||||
|
plotfield = 'spm'
|
||||||
|
cordict = {}
|
||||||
|
div = "No Data found"
|
||||||
|
script = ''
|
||||||
|
|
||||||
|
response = render(request,
|
||||||
|
'cumstats.html',
|
||||||
|
{
|
||||||
|
'stats':stats,
|
||||||
|
'teams':get_my_teams(request.user),
|
||||||
|
'options':options,
|
||||||
|
'id':theuser,
|
||||||
|
'theuser':u,
|
||||||
|
'startdate':startdate,
|
||||||
|
'enddate':enddate,
|
||||||
|
'form':form,
|
||||||
|
'deltaform':deltaform,
|
||||||
|
'optionsform':optionsform,
|
||||||
|
'cordict':cordict,
|
||||||
|
'plotscript':script,
|
||||||
|
'plotdiv':div,
|
||||||
|
'plotfield':plotfield,
|
||||||
|
})
|
||||||
|
|
||||||
|
request.session['options'] = options
|
||||||
|
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Create stats
|
# Create stats
|
||||||
|
|||||||
Reference in New Issue
Block a user