From 219bac42292d6965b558cb99f3d89df93baf2656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Mon, 8 Dec 2014 16:07:53 -0600 Subject: [PATCH] layerindex/models.py: Branch model fix inital_data fixture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add default = datetime.now attr to updated field of Branch model because it fails when try to insert inital data with NULL. Signed-off-by: Aníbal Limón --- layerindex/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layerindex/models.py b/layerindex/models.py index acddf31..dd291a3 100644 --- a/layerindex/models.py +++ b/layerindex/models.py @@ -20,7 +20,7 @@ class Branch(models.Model): short_description = models.CharField(max_length=50, blank=True) sort_priority = models.IntegerField(blank=True, null=True) - updated = models.DateTimeField(auto_now = True) + updated = models.DateTimeField(auto_now = True, default = datetime.now) class Meta: verbose_name_plural = "Branches"