0010_auto_20160517_1650.py 591 B

12345678910111213141516171819202122
  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.db import migrations, models
  4. def approve_dd_fprs(apps, schema_editor):
  5. Fingerprint = apps.get_model("backend", "Fingerprint")
  6. for f in Fingerprint.objects.all():
  7. if f.person.status in ("dc_ga", "dm_ga", "dd_u", "dd_nu", "dd_e", "dd_r", "dc_ga_r"):
  8. f.endorsement_valid = True
  9. f.save()
  10. class Migration(migrations.Migration):
  11. dependencies = [
  12. ('backend', '0009_auto_20160517_1627'),
  13. ]
  14. operations = [
  15. migrations.RunPython(approve_dd_fprs),
  16. ]