Skip to content

Commit

Permalink
testresult: Fix the date timestamp to update every time
Browse files Browse the repository at this point in the history
The intention for that field was to be the time stamp of the last test
result update. Unfortunately, I used the idiom for 'created' time
stamps instead of 'updated' ones.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
  • Loading branch information
Damien Lespiau committed Dec 17, 2015
1 parent 301fe12 commit 3422cc5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions patchwork/migrations/0011_test_results_updated_ts_fix.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('patchwork', '0010_test_results_to_cc_list'),
]

operations = [
migrations.AlterField(
model_name='testresult',
name='date',
field=models.DateTimeField(auto_now=True),
),
]
2 changes: 1 addition & 1 deletion patchwork/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ class TestResult(models.Model):
revision = models.ForeignKey(SeriesRevision, blank=True, null=True)
patch = models.ForeignKey(Patch, blank=True, null=True)
user = models.ForeignKey(User)
date = models.DateTimeField(default=datetime.datetime.now)
date = models.DateTimeField(auto_now=True)
state = models.SmallIntegerField(choices=STATE_CHOICES)
url = models.URLField(blank=True, null=True)
summary = models.TextField(blank=True, null=True)
Expand Down

0 comments on commit 3422cc5

Please sign in to comment.