def clear_review(apps, schema_editor):
 DocumentSpamAttempt = apps.get_model(u'wiki', u'DocumentSpamAttempt')
 to_clear = DocumentSpamAttempt.objects.filter(review=REVIEW_UNAVAILABLE)
 to_clear.update(review=NEEDS_REVIEW)

def clear_review ( apps , schema_editor ) : DocumentSpamAttempt = apps . get_model ( u'wiki' , u'DocumentSpamAttempt' ) to_clear = DocumentSpamAttempt . objects . filter ( review = REVIEW_UNAVAILABLE ) to_clear . update ( review = NEEDS_REVIEW )
revert review_unavailable back to needs_review .