working, passing, everything
This commit is contained in:
@@ -64,7 +64,7 @@ def create_team(name,manager,private='open',notes='',viewing='allmembers'):
|
||||
if manager.rower.rowerplan == 'basic':
|
||||
if manager.rower.protrialexpires < timezone.now().date() and manager.rower.plantrialexpires < timezone.now().date():
|
||||
return (0,'You need to upgrade to a paid plan to establish a team')
|
||||
elif manager.rower.rowerplan != 'coach':
|
||||
if manager.rower.rowerplan != 'coach':
|
||||
ts = Team.objects.filter(manager=manager)
|
||||
if len(ts)>=1:
|
||||
return (0,'You need to upgrade to the Coach plan to have more than one team')
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
@@ -4,7 +4,7 @@ from statements import *
|
||||
def start_trial_view(request):
|
||||
r = getrower(request.user)
|
||||
|
||||
if r.protrialexpires is not None:
|
||||
if r.protrialexpires > datetime.date(1970,1,1):
|
||||
messages.error(request,'You do not qualify for a trial')
|
||||
url = '/rowers/paidplans'
|
||||
return HttpResponseRedirect(url)
|
||||
@@ -31,7 +31,7 @@ def start_trial_view(request):
|
||||
def start_plantrial_view(request):
|
||||
r = getrower(request.user)
|
||||
|
||||
if r.plantrialexpires is not None:
|
||||
if r.plantrialexpires > datetime.date(1970,1,1):
|
||||
messages.error(request,'You do not qualify for a trial')
|
||||
url = '/rowers/paidplans'
|
||||
return HttpResponseRedirect(url)
|
||||
|
||||
Reference in New Issue
Block a user