Private
Public Access
1
0

Fixed Concept2 Import bug (empty notes field)

This commit is contained in:
sanderroosendaal
2016-11-01 22:38:56 +01:00
parent 86ad96d6c0
commit 23266b02c0
4 changed files with 1082 additions and 2 deletions

1060
media/Import_27651449.csv Normal file

File diff suppressed because it is too large Load Diff

View 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),
),
]

View File

@@ -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):

View File

@@ -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())