예제 #1
0
    def post(self, request, *args, **kwargs):
        stuck_reg = self.get_object()
        if Registration.find_failed_registrations().filter(id=stuck_reg.id).exists():
            stuck_reg.delete_registration_tree(save=True)
            messages.success(request, 'The registration has been deleted')
        else:
            messages.error(request, 'This registration may not technically be stuck,'
                                    ' if the problem persists get a developer to fix it.')

        return redirect(reverse_node(self.kwargs.get('guid')))
예제 #2
0
    def post(self, request, *args, **kwargs):
        stuck_reg = self.get_object()
        if Registration.find_failed_registrations().filter(id=stuck_reg.id).exists():
            stuck_reg.delete_registration_tree(save=True)
            messages.success(request, 'The registration has been deleted')
        else:
            messages.error(request, 'This registration may not technically be stuck,'
                                    ' if the problem persists get a developer to fix it.')

        return redirect(reverse_node(self.kwargs.get('guid')))
예제 #3
0
 def get_queryset(self):
     return Registration.find_failed_registrations().order_by(self.ordering)
예제 #4
0
파일: views.py 프로젝트: icereval/osf.io
 def get_queryset(self):
     return Registration.find_failed_registrations().order_by(self.ordering)