<commit_before>#Start Database

from gameheart.entities import models
from gameheart.entities import forms

user = User.objects.get(id=1)
has_profile = UserProfile.objects.get(user=user).count()
if user:
    if has_profile:
        form = UserProfileForm()
        model_instance = form.save(commit=False)
        model_instance.user = user
        model_instance.save()
<commit_msg>Made startdb.py actually work for a blank db<commit_after>#Start Database

from gameheart.entities.models import *
from gameheart.entities.forms import *

user = User.objects.get(id=1)

try: 
	profile = UserProfile.objects.get(user=user)

except UserProfile.DoesNotExist:
	form = UserProfileForm()
	model_instance = form.save(commit=False)
	model_instance.user = user
	model_instance.save()


{'fraction_non_alphanumeric': 0.0967741935483871, 'fraction_numerical': 0.0025806451612903226, 'mean_word_length': 4.58273381294964, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5026078', 'n_tokens_mistral': 241, 'n_tokens_neox': 241, 'n_words': 54}