Skip to content

sh-52 add post create by drf#53

Open
jrhong95 wants to merge 1 commit intohomework-shfrom
sh-52-add-post-create-by-drf
Open

sh-52 add post create by drf#53
jrhong95 wants to merge 1 commit intohomework-shfrom
sh-52-add-post-create-by-drf

Conversation

@jrhong95
Copy link
Contributor

  • 기존 테스트에서 text, title이 각각 없을 경우에 대한 test 추가

@jrhong95 jrhong95 requested a review from TaeHyoungKwon July 14, 2021 16:41
Comment on lines +23 to +29
for key in serializer.errors:
if key == "author":
return Response({"message": "author를 찾을 수 없습니다."}, status=status.HTTP_404_NOT_FOUND)
elif key == "title":
return Response({"message": "title이 없습니다."}, status=status.HTTP_400_BAD_REQUEST)
elif key == "text":
return Response({"message": "text가 없습니다."}, status=status.HTTP_400_BAD_REQUEST)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validationError를 message로 직접 사용하는 방법은 없나요??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments