From a1fc2f8d7c68f2824bb52dc87f07441b8109a40c Mon Sep 17 00:00:00 2001 From: chrisbell Date: Mon, 5 Jan 2026 16:51:19 -0600 Subject: [PATCH] Commented out validation for MotherID and FatherID for now, as tey arent actually required --- .../CritterFolio/Pages/CritterPage.axaml.cs | 47 ++++++++++--------- .../CritterFolio/Pages/HomePage.axaml.cs | 1 + 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/critterfolio/CritterFolio/CritterFolio/Pages/CritterPage.axaml.cs b/critterfolio/CritterFolio/CritterFolio/Pages/CritterPage.axaml.cs index 836ec3c..23c6d8e 100644 --- a/critterfolio/CritterFolio/CritterFolio/Pages/CritterPage.axaml.cs +++ b/critterfolio/CritterFolio/CritterFolio/Pages/CritterPage.axaml.cs @@ -151,7 +151,7 @@ public partial class CritterPage : Page } else { - errString += "Invalid gender somehow. Please report this to the developer\n"; + errString += "Gender is invalid somehow. Please report this to the developer\n"; } // Birthday validation @@ -161,30 +161,31 @@ public partial class CritterPage : Page } else { - errString += "Birthday is null somehow. Please report this to the developer\n"; - } - - // Father ID validation - if (FatherPicker.SelectedItem is int fatherId) - { - _critter.FatherId = fatherId; - } - else - { - errString += "FatherId is null or invalid somehow. Please report this to the developer\n"; + errString += "Birthday is invalid somehow. Please report this to the developer\n"; } + + // Dont need to validate these yet, as they are not required + // // Father ID validation + // if (FatherPicker.SelectedItem is int fatherId) + // { + // _critter.FatherId = fatherId; + // } + // else + // { + // errString += "FatherId is null or invalid somehow. Please report this to the developer\n"; + // } + // + // // Mother ID validation + // if (MotherPicker.SelectedItem is int motherId) + // { + // _critter.MotherId = motherId; + // } + // else + // { + // errString += "MotherId is null or invalid somehow. Please report this to the developer\n"; + // } - // Mother ID validation - if (MotherPicker.SelectedItem is int motherId) - { - _critter.MotherId = motherId; - } - else - { - errString += "MotherId is null or invalid somehow. Please report this to the developer\n"; - } - - return errString != "" ? (false, errString) : (true, errString); + return errString != "" ? (false, errString) : (true, "No errors"); } } \ No newline at end of file diff --git a/critterfolio/CritterFolio/CritterFolio/Pages/HomePage.axaml.cs b/critterfolio/CritterFolio/CritterFolio/Pages/HomePage.axaml.cs index 4c0f8a6..52f198b 100644 --- a/critterfolio/CritterFolio/CritterFolio/Pages/HomePage.axaml.cs +++ b/critterfolio/CritterFolio/CritterFolio/Pages/HomePage.axaml.cs @@ -93,6 +93,7 @@ public partial class HomePage : Page var result = await DatabaseService.AddCritter(newCritter); AddProfileButton(newCritter); Logger.LogToFile("New critter was added"); + ProfileButtonClicked(newCritter); } catch (Exception exception) {