<commit_before><commit_msg>Add claimreview command to correct date of claims added later<commit_after>import pandas as pd

from django.contrib.auth.models import User, BaseUserManager
from django.core.management.base import BaseCommand

from lowfat.models import Expense

class Command(BaseCommand):
    help = "Review claims looking for wrong date."

    def handle(self, *args, **options):
        for expense in Expense.objects.all():
            if expense.funds_from != "F" and expense.received_date > expense.fund.claimant.inauguration_grant_expiration:
                expense.received_date = expense.fund.claimant.inauguration_grant_expiration
                expense.save()
{'fraction_non_alphanumeric': 0.07771260997067449, 'fraction_numerical': 0.0, 'mean_word_length': 3.8785714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7046790', 'n_tokens_mistral': 187, 'n_tokens_neox': 179, 'n_words': 52}