diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-12-10 16:55:17 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-12-10 16:55:17 +0100 |
| commit | 9227051e8bdbbae75064da3e537aba499a794289 (patch) | |
| tree | be0552b8eaaefbce6d4094343634f245f3cc4f55 /archaeological_finds/migrations | |
| parent | 4f7ee53df30339980ac0ed38a3a2af17a84c34e2 (diff) | |
| download | Ishtar-9227051e8bdbbae75064da3e537aba499a794289.tar.bz2 Ishtar-9227051e8bdbbae75064da3e537aba499a794289.zip | |
Treatments: manage loan, loan return and packaging by parameters
Diffstat (limited to 'archaeological_finds/migrations')
| -rw-r--r-- | archaeological_finds/migrations/0049_auto_20181210_1518.py (renamed from archaeological_finds/migrations/0049_auto_20181210_1216.py) | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/archaeological_finds/migrations/0049_auto_20181210_1216.py b/archaeological_finds/migrations/0049_auto_20181210_1518.py index debe1b775..d2510c7fd 100644 --- a/archaeological_finds/migrations/0049_auto_20181210_1216.py +++ b/archaeological_finds/migrations/0049_auto_20181210_1518.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-12-10 12:16 +# Generated by Django 1.11.10 on 2018-12-10 15:18 from __future__ import unicode_literals from django.db import migrations, models @@ -17,6 +17,11 @@ def migrate_treatment_types(apps, schema): loan_r = q.all()[0] loan_r.restore_reference_location = True loan_r.save() + q = TreatmentType.objects.filter(txt_idx="packaging") + if q.count(): + packaging = q.all()[0] + packaging.change_reference_location = True + packaging.save() q = TreatmentType.objects.filter(txt_idx="virtual-reassembly") if q.count(): v = q.all()[0] @@ -46,6 +51,11 @@ class Migration(migrations.Migration): ), migrations.AddField( model_name='treatmenttype', + name='change_reference_location', + field=models.BooleanField(default=False, help_text='The treatment change the reference location.', verbose_name='Change reference location'), + ), + migrations.AddField( + model_name='treatmenttype', name='restore_reference_location', field=models.BooleanField(default=False, help_text='The treatment change restore reference location to the current location.', verbose_name='Restore the reference location'), ), |
