Added missing migrations

This commit is contained in:
Marc Aymerich 2016-01-27 09:21:00 +00:00
parent 2e317e529f
commit 3faf519a49
2 changed files with 20 additions and 1 deletions

View File

@ -227,7 +227,7 @@ class Bill(models.Model):
if self.is_open: if self.is_open:
prefix = 'O{}'.format(prefix) prefix = 'O{}'.format(prefix)
year = timezone.now().strftime("%Y") year = timezone.now().strftime("%Y")
bills = cls.objects.filter(number__regex=r'^%s%s[1-9]+' % (prefix, year) bills = cls.objects.filter(number__regex=r'^%s%s[1-9]+' % (prefix, year))
last_number = bills.order_by('-number').values_list('number', flat=True).first() last_number = bills.order_by('-number').values_list('number', flat=True).first()
if last_number is None: if last_number is None:
last_number = 0 last_number = 0

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('plans', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='rate',
name='plan',
field=models.ForeignKey(related_name='rates', to='plans.Plan', blank=True, null=True, verbose_name='plan'),
),
]