2019-08-14 16:24:07 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import migrations
|
|
|
|
from nodeodm.models import ProcessingNode
|
|
|
|
|
|
|
|
def rename_default_node(apps, schema_editor):
|
|
|
|
for default_node in ProcessingNode.objects.filter(hostname='node-odm-1'):
|
|
|
|
default_node.hostname = 'webodm_node-odm_1'
|
2019-08-14 19:12:46 +00:00
|
|
|
default_node.label = 'node-odm-1'
|
2019-08-14 16:24:07 +00:00
|
|
|
default_node.save()
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2019-08-14 17:33:46 +00:00
|
|
|
('nodeodm', '0007_auto_20190520_1258'),
|
2019-08-14 16:24:07 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.RunPython(rename_default_node),
|
|
|
|
]
|