Fixed a bug where it blocked users with 0 limits.

pull/1805/head
Jamie 7 years ago committed by GitHub
parent 5d0a8fb493
commit e96089f5eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,6 +58,9 @@ namespace Ombi.Core.Rule.Rules.Request
var requestLog = _requestLog.GetAll().Where(x => x.UserId == obj.RequestedUserId); var requestLog = _requestLog.GetAll().Where(x => x.UserId == obj.RequestedUserId);
if (obj.RequestType == RequestType.Movie) if (obj.RequestType == RequestType.Movie)
{ {
if (movieLimit <= 0)
return Success();
var movieLogs = requestLog.Where(x => x.RequestType == RequestType.Movie); var movieLogs = requestLog.Where(x => x.RequestType == RequestType.Movie);
// Count how many requests in the past 7 days // Count how many requests in the past 7 days
@ -70,6 +73,9 @@ namespace Ombi.Core.Rule.Rules.Request
} }
else else
{ {
if (episodeLimit <= 0)
return Success();
var child = (ChildRequests) obj; var child = (ChildRequests) obj;
var requestCount = 0; var requestCount = 0;
// Get the count of requests to be made // Get the count of requests to be made
@ -92,4 +98,4 @@ namespace Ombi.Core.Rule.Rules.Request
return Success(); return Success();
} }
} }
} }

Loading…
Cancel
Save