mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Fixed a bit of a stupid bug in the resetter and added unit tests around it to make sure this never happens again.
This commit is contained in:
parent
3563f166c9
commit
2d0b87b558
6 changed files with 507 additions and 349 deletions
|
@ -109,7 +109,8 @@ namespace PlexRequests.Services.Jobs
|
|||
var users = allUsers.Where(x => x.RequestType == type);
|
||||
foreach (var u in users)
|
||||
{
|
||||
if (u.FirstRequestDate > DateTime.UtcNow.AddDays(-7))
|
||||
var daysDiff = (u.FirstRequestDate - DateTime.UtcNow.AddDays(-7)).Days;
|
||||
if (daysDiff <= 0)
|
||||
{
|
||||
Repo.Delete(u);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue