Commit 0031d025 authored by ibuler's avatar ibuler

[Bugfix] 修复上次提交引起的bug

parent ebef4f25
......@@ -70,13 +70,6 @@ class CeleryTaskLogApi(generics.RetrieveAPIView):
end = False
queryset = CeleryTask.objects.all()
def get_object(self):
return CeleryTask(
id="4cae9ad8-1116-45e7-b019-9b1856696fd7",
log_path="2018-05-10/ca77e6db-9ac6-4970-80d1-eecdbcc3fcc5.log",
status="finished"
)
def get(self, request, *args, **kwargs):
mark = request.query_params.get("mark") or str(uuid.uuid4())
task = self.get_object()
......
......@@ -124,6 +124,3 @@ class AdHocHistoryDetailView(AdminUserRequiredMixin, DetailView):
class CeleryTaskLogView(AdminUserRequiredMixin, DetailView):
template_name = 'ops/celery_task_log.html'
model = CeleryTask
def get_object(self, queryset=None):
return CeleryTask(id="4cae9ad8-1116-45e7-b019-9b1856696fd7")
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