CQ fixes
Build and Push Docker Image / build-and-push (pull_request) Successful in 58s
Python Code Quality / python-code-quality (pull_request) Successful in 11s
Python Test / python-test (pull_request) Successful in 18s

This commit is contained in:
Brian Bjarke Jensen
2025-11-12 18:18:17 +01:00
parent cb20abfb85
commit 824358f846
4 changed files with 68 additions and 67 deletions
+5 -5
View File
@@ -1,7 +1,6 @@
"""Seed test data into the database for demo purposes."""
import sys
import os
from pathlib import Path
from datetime import datetime
@@ -96,14 +95,18 @@ def seed_database(reference_time: datetime | None = None) -> None:
if child_id is None:
# Create new child
child_id = child_repo.create(
created_child = child_repo.create(
name=child_data["name"],
birth_time=child_data["birth_time"],
birth_weight=child_data["birth_weight"],
user_id=user_ids[0],
)
child_id = created_child["id"]
print(f"✓ Created child '{child_data['name']}'")
# Ensure child_id is set
assert child_id is not None, "Child ID must be set at this point"
# Share child with second user if not already shared
parent_ids = child_repo.get_parent_ids(child_id)
if user_ids[1] not in parent_ids:
@@ -111,9 +114,6 @@ def seed_database(reference_time: datetime | None = None) -> None:
msg = f"✓ Shared child with '{test_data['users'][1]['username']}'"
print(msg)
# Ensure child_id is set
assert child_id is not None, "Child ID must be set at this point"
# Clear existing logs to avoid duplicates
print("Clearing existing logs...")