mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Fix some wrong redirects, use the shortname instead of the class path
This commit is contained in:
@@ -199,7 +199,7 @@ class HrAddNote(CreateView):
|
|||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
if not check_permissions(request.user) == HR_ADMIN:
|
if not check_permissions(request.user) == HR_ADMIN:
|
||||||
return HttpResponseRedirect(reverse('hr.views.HrIndexView'))
|
return HttpResponseRedirect(reverse('hr-index'))
|
||||||
self.application = Application.objects.get(pk=kwargs.get('applicationid'))
|
self.application = Application.objects.get(pk=kwargs.get('applicationid'))
|
||||||
return super(HrAddNote, self).dispatch(request, *args, **kwargs)
|
return super(HrAddNote, self).dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ class HrAddMessage(HrAddNote):
|
|||||||
self.application = Application.objects.get(pk=kwargs.get('applicationid'))
|
self.application = Application.objects.get(pk=kwargs.get('applicationid'))
|
||||||
self.perm = check_permissions(request.user, self.application)
|
self.perm = check_permissions(request.user, self.application)
|
||||||
if not self.perm:
|
if not self.perm:
|
||||||
return HttpResponseRedirect(reverse('hr.views.HrIndexView'))
|
return HttpResponseRedirect(reverse('hr-index'))
|
||||||
return super(HrAddMessage, self).dispatch(request, *args, **kwargs)
|
return super(HrAddMessage, self).dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
def get_form_class(self):
|
def get_form_class(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user