mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-30 19:55:08 -04:00
Added Check for arguments
This commit is contained in:
parent
d073e2c664
commit
b744ceabaa
@ -1724,6 +1724,12 @@ public sealed class BaseItemRepository(
|
|||||||
|
|
||||||
private BaseItemDto DeserialiseBaseItem(BaseItemEntity baseItemEntity, bool skipDeserialization = false)
|
private BaseItemDto DeserialiseBaseItem(BaseItemEntity baseItemEntity, bool skipDeserialization = false)
|
||||||
{
|
{
|
||||||
|
ArgumentNullException.ThrowIfNull(baseItemEntity, nameof(baseItemEntity));
|
||||||
|
if (serverConfigurationManager?.Configuration is null)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("Server Configuration manager or configuration is null");
|
||||||
|
}
|
||||||
|
|
||||||
var typeToSerialise = GetType(baseItemEntity.Type);
|
var typeToSerialise = GetType(baseItemEntity.Type);
|
||||||
return BaseItemRepository.DeserialiseBaseItem(
|
return BaseItemRepository.DeserialiseBaseItem(
|
||||||
baseItemEntity,
|
baseItemEntity,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user