SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit e8bcb3ee authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Small debugs

parent 54070163
No related branches found
No related tags found
No related merge requests found
......@@ -238,7 +238,9 @@ class PotentialFellowshipForm(RequestFormMixin, forms.ModelForm):
'Advisory Board', 'Editorial College']).exists()
if nominated:
potfel.status = POTENTIAL_FELLOWSHIP_NOMINATED
potfel.in_agreement.add(self.request.user.contributor)
# If user is Senior Fellow for that College, auto-add Agree vote
if self.request.user.contributor.fellowships.senior().filter(college=potfel.college).exists():
potfel.in_agreement.add(self.request.user.contributor)
event = POTENTIAL_FELLOWSHIP_EVENT_NOMINATED
else:
potfel.status = POTENTIAL_FELLOWSHIP_IDENTIFIED
......
......@@ -64,7 +64,7 @@ class PotentialFellowship(models.Model):
* is in AdvisoryBoard for this College's Academic Field
* is a Senior Fellow in the College proposed
"""
return (user.contributor.is_scipost_admin() or
return (user.contributor.is_scipost_admin or
user.contributor.is_in_advisory_board and user.contributor.profile.acad_field == self.college.acad_field or
user.contributor.fellowships.senior().filter(college=self.college).exists())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment