bug fixes
This commit is contained in:
@@ -742,40 +742,49 @@ def virtualevent_withdrawresult_view(request,id=0,recordid=0):
|
|||||||
else:
|
else:
|
||||||
form = DisqualificationForm(request.POST)
|
form = DisqualificationForm(request.POST)
|
||||||
|
|
||||||
workout = Workout.objects.get(id=record.workoutid)
|
try:
|
||||||
|
workout = Workout.objects.get(id=record.workoutid)
|
||||||
|
g = GraphImage.objects.filter(workout=workout).order_by("-creationdatetime")
|
||||||
|
for i in g:
|
||||||
|
try:
|
||||||
|
width,height = Image.open(i.filename).size
|
||||||
|
i.width = width
|
||||||
|
i.height = height
|
||||||
|
i.save()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
g = GraphImage.objects.filter(workout=workout).order_by("-creationdatetime")
|
script, div = interactive_chart(record.workoutid)
|
||||||
for i in g:
|
|
||||||
try:
|
|
||||||
width,height = Image.open(i.filename).size
|
|
||||||
i.width = width
|
|
||||||
i.height = height
|
|
||||||
i.save()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
script, div = interactive_chart(record.workoutid)
|
f1 = workout.csvfilename
|
||||||
|
rowdata = rdata(f1)
|
||||||
f1 = workout.csvfilename
|
hascoordinates = 1
|
||||||
rowdata = rdata(f1)
|
if rowdata != 0:
|
||||||
hascoordinates = 1
|
try:
|
||||||
if rowdata != 0:
|
latitude = rowdata.df[' latitude']
|
||||||
try:
|
if not latitude.std():
|
||||||
latitude = rowdata.df[' latitude']
|
hascoordinates = 0
|
||||||
if not latitude.std():
|
except (KeyError, AttributeError):
|
||||||
hascoordinates = 0
|
hascoordinates = 0
|
||||||
except (KeyError, AttributeError):
|
else:
|
||||||
hascoordinates = 0
|
hascoordinates = 0
|
||||||
else:
|
|
||||||
hascoordinates = 0
|
|
||||||
|
|
||||||
if hascoordinates:
|
if hascoordinates:
|
||||||
mapscript, mapdiv = leaflet_chart(rowdata.df[' latitude'],
|
mapscript, mapdiv = leaflet_chart(rowdata.df[' latitude'],
|
||||||
rowdata.df[' longitude'],
|
rowdata.df[' longitude'],
|
||||||
workout.name)
|
workout.name)
|
||||||
else:
|
else:
|
||||||
|
mapscript = ""
|
||||||
|
mapdiv = ""
|
||||||
|
except Workout.DoesNotExist:
|
||||||
mapscript = ""
|
mapscript = ""
|
||||||
mapdiv = ""
|
mapdiv = ""
|
||||||
|
workout = None
|
||||||
|
script = ""
|
||||||
|
div = ""
|
||||||
|
g = None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
breadcrumbs = [
|
breadcrumbs = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user