Fixed Concept2 Import bug (empty notes field)
This commit is contained in:
1060
media/Import_27651449.csv
Normal file
1060
media/Import_27651449.csv
Normal file
File diff suppressed because it is too large
Load Diff
20
rowers/migrations/0042_auto_20161101_2235.py
Normal file
20
rowers/migrations/0042_auto_20161101_2235.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.9.5 on 2016-11-01 21:35
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('rowers', '0041_rower_friends'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='workout',
|
||||||
|
name='notes',
|
||||||
|
field=models.CharField(blank=True, max_length=200, null=True),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -97,7 +97,7 @@ class Workout(models.Model):
|
|||||||
maxhr = models.IntegerField(blank=True,null=True)
|
maxhr = models.IntegerField(blank=True,null=True)
|
||||||
uploadedtostrava = models.IntegerField(default=0)
|
uploadedtostrava = models.IntegerField(default=0)
|
||||||
uploadedtosporttracks = models.IntegerField(default=0)
|
uploadedtosporttracks = models.IntegerField(default=0)
|
||||||
notes = models.CharField(blank=True,max_length=200)
|
notes = models.CharField(blank=True,null=True,max_length=200)
|
||||||
summary = models.TextField(blank=True)
|
summary = models.TextField(blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ def add_workout_from_strokedata(user,importid,data,strokedata,source='c2'):
|
|||||||
t = data['comments'].split('\n', 1)[0]
|
t = data['comments'].split('\n', 1)[0]
|
||||||
title += t[:20]
|
title += t[:20]
|
||||||
except:
|
except:
|
||||||
pass
|
title = 'Imported'
|
||||||
|
|
||||||
starttimeunix = mktime(rowdatetime.timetuple())
|
starttimeunix = mktime(rowdatetime.timetuple())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user