mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Preemptive auto_now fix for Django 1.8
Django 1.8 does not allow DateFields that have both auto_now and default set - since they are mutually exclusive; if you have auto_now you don't need a default. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
d4b4f40eca
commit
3df2b1c5d9
|
@ -38,7 +38,7 @@ class Branch(models.Model):
|
||||||
updates_enabled = models.BooleanField('Enable updates', default=True, help_text='Enable automatically updating layer metadata for this branch via the update script')
|
updates_enabled = models.BooleanField('Enable updates', default=True, help_text='Enable automatically updating layer metadata for this branch via the update script')
|
||||||
update_environment = models.ForeignKey(PythonEnvironment, blank=True, null=True, on_delete=models.SET_NULL)
|
update_environment = models.ForeignKey(PythonEnvironment, blank=True, null=True, on_delete=models.SET_NULL)
|
||||||
|
|
||||||
updated = models.DateTimeField(auto_now = True, default = datetime.now)
|
updated = models.DateTimeField(auto_now=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name_plural = "Branches"
|
verbose_name_plural = "Branches"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user