def post(self, request, *args, **kwargs):
post_data = request.data
task_id = post_data.get("task_id")
head = post_data.get("comment_head")
value = post_data.get("comment_description")
code = post_data.get("code")
task = entity_Task(task_id=task_id)
if task and head and value:
try:
if code and code == DELAY_FLAG_CODE:
entity_Comment.add_comment_flag_delay(
user=user, task_id=task_id, value=collection_feedback)
else:
comment = entity_Comment.add_comment_with_task_id(
user=request.user, task_id=task_id, head=head, value=value)
return JSONResponse({'code': 200, 'response': {"status": "Comment Saved"}})
except Exception as e:
xprint(e, traceback.format_exc())
return JSONResponse({'code': 500, 'response': {"error": str(e)}});
return JSONResponse({'code':200,'response':'Data Insufficient'})
после запуска этого кода в редакторе vscode я получаю ошибку ниже
IndentationError: unindent не соответствует ни одному внешнему уровню отступа.