Browse files

Merge branch 'hotfix/hvad_mig_again'

  • Loading branch information...
2 parents f28b364 + eb629a3 commit a8ff1d13decf32f35769f36327988ee4744bfbc8 @freddylimpens freddylimpens committed Apr 10, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 apps/project_sheet/autocomplete_light_registry.py
  2. +2 −2 apps/project_sheet/views.py
View
2 apps/project_sheet/autocomplete_light_registry.py
@@ -9,7 +9,7 @@ class AutocompleteI4pProject(autocomplete_light.AutocompleteModelTemplate):
def choices_for_request(self):
q = self.request.GET.get('q', '')
project_translations = I4pProjectTranslation.objects.filter(title__icontains=q)
- return [project_translation.project for project_translation in project_translations]
+ return [project_translation.master for project_translation in project_translations]
autocomplete_light.register(I4pProject, AutocompleteI4pProject)
View
4 apps/project_sheet/views.py
@@ -655,7 +655,7 @@ def post(self, request, *args, **kwargs):
self.project_member_add_form = ProjectMemberAddForm(request.POST, request.FILES)
# check if not yet member
- if request.user in self.project_translation.project.members.all():
+ if request.user in self.project_translation.master.members.all():
return redirect(self.project_translation)
if self.project_member_add_form.is_valid():
@@ -664,7 +664,7 @@ def post(self, request, *args, **kwargs):
project_member.user = request.user
project_member.save()
- return redirect(self.project_translation)
+ return redirect(self.project_translation.master)
else:
return super(ProjectMemberAddView, self).get(request, *args, **kwargs)

0 comments on commit a8ff1d1

Please sign in to comment.