서승완
Builds for 1 pipeline passed in 11 minutes 57 seconds

fix: check name is empty

...@@ -271,6 +271,8 @@ def update_item(request, file_id): ...@@ -271,6 +271,8 @@ def update_item(request, file_id):
271 271
272 # Update 272 # Update
273 if 'name' in received: 273 if 'name' in received:
274 + if received['name'] == '':
275 + return {'result': False, 'error': '이름을 제대로 입력해주세요.'}
274 file[0].name = received['name'] 276 file[0].name = received['name']
275 if 'parent_id' in received: 277 if 'parent_id' in received:
276 file[0].parent_id = received['parent_id'] 278 file[0].parent_id = received['parent_id']
......
...@@ -148,6 +148,8 @@ def update_me(request): ...@@ -148,6 +148,8 @@ def update_me(request):
148 148
149 # Change Name 149 # Change Name
150 if 'name' in received: 150 if 'name' in received:
151 + if len(received['name']) == 0:
152 + return {'result': False, 'error': '이름을 제대로 입력해주세요.'}
151 user[0].name = received['name'] 153 user[0].name = received['name']
152 154
153 # Change Password 155 # Change Password
......