fix image results

This commit is contained in:
cake
2025-10-26 17:43:49 +01:00
parent 6ac56d38c0
commit ae09d79577

View File

@@ -803,8 +803,8 @@ public partial class LightlessHub
cancellationToken)
.ConfigureAwait(false);
ImageCheckService.ImageLoadResult profileResult = null;
ImageCheckService.ImageLoadResult bannerResult = null;
ImageCheckService.ImageLoadResult profileResult = new();
ImageCheckService.ImageLoadResult bannerResult = new();
//Avatar image validation
if (!string.IsNullOrEmpty(dto.PictureBase64))
@@ -839,7 +839,7 @@ public partial class LightlessHub
IsNSFW = dto.IsNsfw ?? false,
};
groupProfileDb.UpdateProfileFromDto(dto, profileResult.Base64Image, bannerResult.Base64Image);
groupProfileDb.UpdateProfileFromDto(dto, profileResult?.Base64Image, bannerResult?.Base64Image);
await DbContext.GroupProfiles.AddAsync(groupProfileDb, cancellationToken).ConfigureAwait(false);
}
else
@@ -850,7 +850,7 @@ public partial class LightlessHub
return;
}
groupProfileDb.UpdateProfileFromDto(dto, profileResult.Base64Image, bannerResult.Base64Image);
groupProfileDb.UpdateProfileFromDto(dto, profileResult?.Base64Image, bannerResult?.Base64Image);
var userIds = await DbContext.GroupPairs
.Where(p => p.GroupGID == groupProfileDb.GroupGID)