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

db 검색시 이상한 결과 도출될듯? #33

Open
ujunhwan opened this issue Jan 9, 2022 · 2 comments
Open

db 검색시 이상한 결과 도출될듯? #33

ujunhwan opened this issue Jan 9, 2022 · 2 comments

Comments

@ujunhwan
Copy link
Contributor

ujunhwan commented Jan 9, 2022

tag = Tag.objects.get(tag_name=request.data['tag_name'])

a라는 사용자가 tag_name='준환'을 저장한 상태에서 b라는 사용자가 tag_name='준환'을 저장하려고 할 때 이미 있는걸로 결과가 나올거같음

중복검사할때 유저도 포함해서 검색 해야할듯!!

@ujunhwan
Copy link
Contributor Author

ujunhwan commented Jan 9, 2022

그리고 is_tag_new 플래그 빼고, get_or_create 함수 사용해서 하는게 좋을듯!! kakaologinview 보면 나도 디비에있으면 그거그대로 쓰고 없으면 새로 회원가입하는 과정을 거쳐야돼서 사용했거든

@chaeri93
Copy link
Contributor

chaeri93 commented Jan 9, 2022

오키오키 수정하께

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

No branches or pull requests

2 participants