Skip to content

Commit

Permalink
fix(bulks): errors handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vladDotH committed Dec 15, 2023
1 parent 0c9296d commit 97c3a7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/app/services/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def bulk_upload_objects(new_objects):
for obj in new_objects:
for k in object_keys:
if k not in obj:
return "Not ok"
raise Exception('invalid object property')
del obj['_id']

if len(new_objects):
Expand Down
2 changes: 1 addition & 1 deletion server/app/services/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def bulk_upload_users(new_users):
for user in new_users:
for k in users_keys:
if k not in user:
return "Not ok"
raise Exception('invalid user property')
del user['_id']

# Пропускаем уже существующих пользователей
Expand Down

0 comments on commit 97c3a7b

Please sign in to comment.