# Run this in a management command or shell
from users.models import Branch

# Create main branch if it doesn't exist
if not Branch.objects.filter(is_main_branch=True).exists():
    Branch.objects.create(
        name="Thika Branch",
        code="THIKA",
        is_main_branch=True
    )
    print("Created Thika Branch as main branch")
else:
    print("Main branch already exists")