diff --git a/adaptive_hockey_federation/core/fixtures/fill_random_diagnosis.py b/adaptive_hockey_federation/core/fixtures/fill_random_diagnosis.py deleted file mode 100644 index ebf64021..00000000 --- a/adaptive_hockey_federation/core/fixtures/fill_random_diagnosis.py +++ /dev/null @@ -1,24 +0,0 @@ -import json -import random - - -# TODO: (Скрипт который заполняет диагнозы игроков, -# но его можно убрать, как будут реальные данные -# по диагнозам игроков.) - - -with open("main_player.json", "r", encoding="utf-8") as f: - players = json.load(f) - -with open("main_diagnosis.json", "r", encoding="utf-8") as f: - diagnoses = json.load(f) - -diagnosis_ids = [diagnosis["id"] for diagnosis in diagnoses] - -for player in players: - player["diagnosis_id"] = random.choice(diagnosis_ids) - -with open("main_player.json", "w", encoding="utf-8") as f: - json.dump(players, f, ensure_ascii=False, indent=4) - -print("Диагнозы успешно назначены и сохранены в main_player_updated.json") diff --git a/adaptive_hockey_federation/core/management/commands/fill-db.py b/adaptive_hockey_federation/core/management/commands/fill-db.py index db2578b2..46301285 100644 --- a/adaptive_hockey_federation/core/management/commands/fill-db.py +++ b/adaptive_hockey_federation/core/management/commands/fill-db.py @@ -56,7 +56,7 @@ def load_real_data(self) -> None: # noqa: C901 "name": item["name"], "city_id": item["city_id"], "discipline_name_id": item["discipline_name_id"], - "curator_id": 1, + "curator_id": None, } instance = model(**team_data) elif table_name == "main_player":