mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 05:53:03 +03:00
Make StartDate/EndDate nullable (#13494)
These dates are used as birthdate and death date for person (ask luke for why) and a non-nullable column would cause the null date become 1901-01-01, making all living people dead.
This commit is contained in:
@@ -645,7 +645,7 @@ public sealed class BaseItemRepository
|
||||
// dto.MediaType = Enum.TryParse<MediaType>(entity.MediaType);
|
||||
if (dto is IHasStartDate hasStartDate)
|
||||
{
|
||||
hasStartDate.StartDate = entity.StartDate;
|
||||
hasStartDate.StartDate = entity.StartDate.GetValueOrDefault();
|
||||
}
|
||||
|
||||
// Fields that are present in the DB but are never actually used
|
||||
@@ -683,7 +683,7 @@ public sealed class BaseItemRepository
|
||||
|
||||
entity.ParentId = !dto.ParentId.IsEmpty() ? dto.ParentId : null;
|
||||
entity.Path = GetPathToSave(dto.Path);
|
||||
entity.EndDate = dto.EndDate.GetValueOrDefault();
|
||||
entity.EndDate = dto.EndDate;
|
||||
entity.CommunityRating = dto.CommunityRating;
|
||||
entity.CustomRating = dto.CustomRating;
|
||||
entity.IndexNumber = dto.IndexNumber;
|
||||
|
||||
Reference in New Issue
Block a user