@@ -0,0 +1,687 @@
+# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.6 on 2017-04-24 14:53%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Adef correct_needs_approval_status(apps, schema_editor):%0A    Project = apps.get_model('projects', 'Project')%0A%0A    for project in Project.objects.filter(payout_status='needs_approval'):%0A        if project.projectpayout_set.get().status in ('in_progress', 'settled'):%0A            project.payout_status = None%0A            project.save()%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A    dependencies = %5B%0A        ('projects', '0025_auto_20170404_1130'),%0A    %5D%0A%0A    operations = %5B%0A        migrations.RunPython(correct_needs_approval_status),%0A    %5D%0A

Mark projects that have a bluebottle payout as not needing approval