def cleanup_certificate_records(apps, schema_editor):
    GeneratedCertificate = apps.get_model('certificates', 'GeneratedCertificate')
    GeneratedCertificate.objects.filter(status='downloadable').exclude(error_reason='').update(error_reason='')
def cleanup_certificate_records(apps, schema_editor):
    GeneratedCertificate = apps.get_model('certificates', 'GeneratedCertificate')
    GeneratedCertificate.objects.filter(status='downloadable').exclude(error_reason=).update(error_reason=)