Fix tests - temp this introduced another bug

This commit is contained in:
Amelia 2025-05-30 13:29:29 +02:00
parent 558a1d73f5
commit 12235a62a2
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
3 changed files with 12 additions and 2 deletions

View file

@ -790,8 +790,13 @@ public class AccountController : BaseApiController
var profile = new AppUserReadingProfileBuilder(user.Id)
.WithName("Default Profile")
.Build();
_unitOfWork.AppUserReadingProfileRepository.Attach(profile);
user.UserPreferences.ReadingProfiles.Add(profile);
user.UserPreferences.DefaultReadingProfile = profile;
// TODO: This doesn't save, but I've had to revert it having the full entity or everything would start failing
// in tests because of foreign key constrains. This HAS to be resolved as the code does expect there to always be a
// default profile
user.UserPreferences.DefaultReadingProfileId = profile.Id;
}
/// <summary>