kopia lustrzana https://github.com/OpenDroneMap/WebODM
30 wiersze
883 B
Python
30 wiersze
883 B
Python
![]() |
# -*- coding: utf-8 -*-
|
||
|
# Generated by Django 1.11.1 on 2017-07-07 18:05
|
||
|
from __future__ import unicode_literals
|
||
|
|
||
|
import django.contrib.postgres.fields
|
||
|
from django.db import migrations, models
|
||
|
from app.models import Task
|
||
|
|
||
|
|
||
|
def detect_available_assets(apps, schema_editor):
|
||
|
for t in Task.objects.all():
|
||
|
print("Updating {}".format(t))
|
||
|
t.update_available_assets_field(True)
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('app', '0005_auto_20170707_1014'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.AddField(
|
||
|
model_name='task',
|
||
|
name='available_assets',
|
||
|
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=80), blank=True, default=[], help_text='List of available assets to download', size=None),
|
||
|
),
|
||
|
migrations.RunPython(detect_available_assets),
|
||
|
]
|