notifications for comments
This commit is contained in:
@@ -327,7 +327,15 @@ class BaseFavoriteFormSet(BaseFormSet):
|
||||
def checkworkoutuser(user,workout):
|
||||
try:
|
||||
r = Rower.objects.get(user=user)
|
||||
return workout.user == r
|
||||
teams = workout.team.all()
|
||||
if workout.user == r:
|
||||
return True
|
||||
elif teams:
|
||||
for team in teams:
|
||||
if user == team.manager:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
except Rower.DoesNotExist:
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user