numerical renewal adds to current term if last term is in the past
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
301aaeb548
commit
625b129e5e
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue