Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sh-52 add post create by drf #53

Open
wants to merge 1 commit into
base: homework-sh
Choose a base branch
from

Conversation

jrhong95
Copy link
Contributor

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

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