Do not update Timer.start on save().

This commit is contained in:
Christopher Charbonneau Wells 2017-08-18 01:01:37 -04:00
parent cf1598fe2c
commit 9ac8432ff8
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-18 03:13
# Generated by Django 1.11.4 on 2017-08-18 05:01
from __future__ import unicode_literals
from django.conf import settings
@ -93,7 +93,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=255, null=True)),
('start', models.DateTimeField(auto_now=True)),
('start', models.DateTimeField(auto_now_add=True)),
('end', models.DateTimeField(blank=True, editable=False, null=True)),
('active', models.BooleanField(default=True, editable=False)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='timers', to=settings.AUTH_USER_MODEL)),

View File

@ -112,7 +112,7 @@ class Sleep(models.Model):
class Timer(models.Model):
name = models.CharField(max_length=255, null=True, blank=True)
start = models.DateTimeField(auto_now=True)
start = models.DateTimeField(auto_now_add=True)
end = models.DateTimeField(blank=True, null=True, editable=False)
active = models.BooleanField(default=True, editable=False)
user = models.ForeignKey('auth.User', related_name='timers')