original_docstring: Task to automatically delete spam accounts
docstring: Task to automatically delete spam accounts
docstring_tokens: Task to automatically delete spam accounts
code: def delete_reported_spam_accounts():
      """Task to automatically delete spam accounts"""
  
      from mozillians.users.models import AbuseReport, UserProfile
  
      # Manual reports deletion heuristic:
      # Delete all unvouched profiles reported both by akismet and mozillians
      reports = AbuseReport.objects.filter(profile__is_vouched=False)
      for report in reports:
          try:
              report.profile.delete()
          except UserProfile.DoesNotExist:
              continue
      reports.delete()
code_tokens: def delete_reported_spam_accounts ( ) : from mozillians . users . models import AbuseReport , UserProfile reports = AbuseReport . objects . filter ( profile__is_vouched = False ) for report in reports : try : report . profile . delete ( ) except UserProfile . DoesNotExist : continue reports . delete ( )
short_docstring: Task to automatically delete spam accounts
short_docstring_tokens: Task to automatically delete spam accounts
comment: """Task to automatically delete spam accounts"""$SEP$# Manual reports deletion heuristic:$SEP$# Delete all unvouched profiles reported both by akismet and mozillians