summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-09-21 12:55:55 +0200
committerKevin Chabowski <kevin@kch42.de>2013-09-21 12:55:55 +0200
commit38b4f4b859ebf803f7314b541554d358cbff054a (patch)
tree3aa77837a81d22cf43ad282bd3e3329f9e7e5a06
parentcaaaeb49d99e1e6bef34cd4b13541259a9240abc (diff)
downloadmailremind-38b4f4b859ebf803f7314b541554d358cbff054a.tar.gz
mailremind-38b4f4b859ebf803f7314b541554d358cbff054a.tar.bz2
mailremind-38b4f4b859ebf803f7314b541554d358cbff054a.zip
When jobsLimit is < 0, no job limit is enforced
-rw-r--r--jobedit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/jobedit.go b/jobedit.go
index 6799bf8..b3bedf0 100644
--- a/jobedit.go
+++ b/jobedit.go
@@ -217,7 +217,7 @@ func jobedit(user model.User, sess *sessions.Session, req *http.Request) (interf
}
if req.Method == "POST" {
- if (job == nil) && (user.CountJobs() >= jobsLimit) {
+ if (job == nil) && (jobsLimit >= 0) && (user.CountJobs() >= jobsLimit) {
outdata.Error = "You have reached the limit of jobs per user."
outdata.Fatal = true
return outdata, user