From abe64d548d22bc8174242e3e4c9156b7f201bfdf Mon Sep 17 00:00:00 2001 From: krystian kempski Date: Tue, 13 Feb 2024 22:43:15 +0100 Subject: [PATCH] Database fixes --- DagoniteEmpire/Pages/CharacterPages/CharacterUpsert.razor | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DagoniteEmpire/Pages/CharacterPages/CharacterUpsert.razor b/DagoniteEmpire/Pages/CharacterPages/CharacterUpsert.razor index 6a619b1..aee14f5 100644 --- a/DagoniteEmpire/Pages/CharacterPages/CharacterUpsert.razor +++ b/DagoniteEmpire/Pages/CharacterPages/CharacterUpsert.razor @@ -231,15 +231,14 @@ { //update await _characterRepository.Update(Character); - var charac = await _characterRepository.Create(Character); foreach (var obj in Attributes) { - obj.CharacterId = charac.Id; + obj.CharacterId = Id; await _attributeRepository.Update(obj); } foreach (var obj in BaseSkills) { - obj.CharacterId = charac.Id; + obj.CharacterId = Id; await _baseSkillRepository.Update(obj); }