@task
def check_spam_account(instance_id, **kwargs):
 from mozillians.users.models import AbuseReport, UserProfile
 spam = akismet_spam_check(**kwargs)
 profile = get_object_or_none(UserProfile, id=instance_id)
 if (spam and profile):
  kwargs = {'type': AbuseReport.TYPE_SPAM, 'profile': profile, 'reporter': None, 'is_akismet': True}
  AbuseReport.objects.get_or_create(**kwargs)

@ task def check_spam_account ( instance_id , ** kwargs ) : from mozillians . users . models import AbuseReport , UserProfile spam = akismet_spam_check ( ** kwargs ) profile = get_object_or_none ( UserProfile , id = instance_id ) if ( spam and profile ) : kwargs = { 'type' : AbuseReport . TYPE_SPAM , 'profile' : profile , 'reporter' : None , 'is_akismet' : True } AbuseReport . objects . get_or_create ( ** kwargs )
task to check if profile is spam according to akismet .