mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fix projected relations mixed with normal relations
This commit is contained in:
parent
7ccfab4d8b
commit
e5dde472c9
@ -36,6 +36,7 @@ using Kyoo.Abstractions.Models.Utils;
|
||||
using Kyoo.Authentication;
|
||||
using Kyoo.Utils;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kyoo.Core.Controllers;
|
||||
|
||||
@ -131,7 +132,10 @@ public static class DapperHelper
|
||||
|
||||
T Map(T item, IEnumerable<object?> relations)
|
||||
{
|
||||
foreach ((string name, object? value) in include.Fields.Zip(relations))
|
||||
IEnumerable<string> metadatas = include.Metadatas
|
||||
.Where(x => x is not Include.ProjectedRelation)
|
||||
.Select(x => x.Name);
|
||||
foreach ((string name, object? value) in metadatas.Zip(relations))
|
||||
{
|
||||
if (value == null)
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user