Skip to content

Commit

Permalink
Merge pull request #64 from DowaDream/fix/#63-review-image
Browse files Browse the repository at this point in the history
[Fix] 이미지 필드를 넣지 않아도 오류 생기지 않도록
  • Loading branch information
sanghyunna authored Aug 17, 2023
2 parents 22a2165 + 6efe16a commit 48215a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion review/review_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def post_review(request) -> ResponseDto:
images = request.data.getlist('images', []) # 기본 값을 빈 리스트로 지정
images = request.data.getlist('images', []) if 'images' in request.data else ['']
if len(images[0]) == 0: # 자동으로 ['']이 들어가기 때문에 한번 더 체크
images = []
elif len(images) > 5:
Expand Down

0 comments on commit 48215a2

Please sign in to comment.