mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix bug in set last episode watch status as completed
This commit is contained in:
parent
df7b6ae71d
commit
47e6c5f978
@ -378,7 +378,9 @@ public class WatchStatusRepository : IWatchStatusRepository
|
||||
}
|
||||
)
|
||||
.Where(x => x.Status == null || x.Status.Status != WatchStatus.Completed)
|
||||
.Select(x => x.Id)
|
||||
// The as Guid? is here to add the nullability status of the queryable.
|
||||
// Without this, FirstOrDefault returns new Guid() when no result is found (which is 16 0s and invalid in sql).
|
||||
.Select(x => x.Id as Guid?)
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
else if (status == WatchStatus.Completed)
|
||||
|
Loading…
x
Reference in New Issue
Block a user