Skip to content

Commit

Permalink
Fix TaskViewMixin shadowing create_task method
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Oct 16, 2020
1 parent 586199d commit fbec668
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions joeflow/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,13 @@ def get_object(self, queryset=None):
@transaction.atomic
def post(self, request, *args, **kwargs):
response = super().post(request, *args, **kwargs)
self.create_task(request)
return response

def create_task(self, request):
task = self.get_task()
task.workflow = self.model._base_manager.get(
pk=self.model._base_manager.get(pk=self.object.pk)
)
task.finish(request.user)
task.start_next_tasks()
return task
return response


class WorkflowDetailView(WorkflowTemplateNameViewMixin, generic.DetailView):
Expand Down

0 comments on commit fbec668

Please sign in to comment.