Commented out validation for MotherID and FatherID for now, as tey arent actually required

This commit is contained in:
2026-01-05 16:51:19 -06:00
parent 4e493c5f06
commit a1fc2f8d7c
2 changed files with 25 additions and 23 deletions

View File

@@ -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";
errString += "Birthday is invalid 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";
}
// 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");
}
}

View File

@@ -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)
{