numerical renewal adds to current term if last term is in the past
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Rio6 2022-10-06 10:44:22 -04:00
parent 301aaeb548
commit 625b129e5e
1 changed files with 2 additions and 8 deletions

View File

@ -183,10 +183,7 @@ class User:
def add_terms(self, terms: List[str] or int):
if type(terms) is int:
if len(self.terms) > 0:
last_term = max(Term(t) for t in self.terms)
else:
last_term = Term.current()-1
last_term = max([Term(t) for t in self.terms] + [Term.current()-1])
terms = [repr(last_term+i) for i in range(1, terms+1)]
for term in terms:
@ -201,10 +198,7 @@ class User:
def add_non_member_terms(self, terms: List[str] or int):
if type(terms) is int:
if len(self.non_member_terms) > 0:
last_term = max(Term(t) for t in self.non_member_terms)
else:
last_term = Term.current()-1
last_term = max([Term(t) for t in self.non_member_terms] + [Term.current()-1])
terms = [repr(last_term+i) for i in range(1, terms+1)]
for term in terms: