mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 11:14:27 +00:00
Add null guard for media types in stats upload controller.
This commit is contained in:
@@ -265,6 +265,8 @@ public sealed class UploadStatsController : ControllerBase
|
||||
{
|
||||
foreach(MediaStats media in newstats.Medias)
|
||||
{
|
||||
if(media.MediaType == null) continue;
|
||||
|
||||
Media? existing =
|
||||
await _ctx.Medias.FirstOrDefaultAsync(c => c.Type == media.MediaType && c.Real == media.real);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user