Commit a38d711c authored by Skia's avatar Skia
Browse files

Merge branch 'bugfix' into 'master'

Hide start_date for non root user from clubs

See merge request !61
parents 41c9f638 fb097193
Pipeline #848 passed with stage
in 3 minutes and 32 seconds
......@@ -133,6 +133,8 @@ class ClubMembersView(ClubTabsMixin, CanViewMixin, UpdateView):
form.instance = Membership.objects.filter(club=self.object).filter('user')).filter(end_date=None).first()
if form.instance is None: # Instanciate a new membership
form.instance = Membership(club=self.object, user=self.request.user)
if not self.request.user.is_root:
form.fields.pop('start_date', None)
# form.initial = {'user': self.request.user}
# form._user = self.request.user
return form
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment