23 lines
511 B
Python
23 lines
511 B
Python
# Generated by Django 2.2.7 on 2020-02-04 14:09
|
|
|
|
import datetime
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def fill_award_type_ears(apps, schemaeditor):
|
|
AwardType = apps.get_model('main', 'AwardType')
|
|
for aw in AwardType.objects.all():
|
|
aw.years = list(range(1980, datetime.date.today().year+1))
|
|
aw.save()
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('main', '0050_awardtype_years'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(fill_award_type_ears),
|
|
]
|