Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GDay committed Mar 26, 2024
1 parent 8d0eec1 commit 27c5c68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions back/admin/integrations/sync_userinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ def create_users(self, new_users, commit=True):
valid_ones = []

if serializer.is_valid():
serializer.save(is_active=False, commit=commit)
if not commit:
if commit:
serializer.save(is_active=False)
else:
return serializer.validated_data
else:
# if we have errors, then only get the valid ones
Expand Down
2 changes: 1 addition & 1 deletion back/admin/integrations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_value_from_notation(notation, value):

try:
value = value[index]
except (TypeError, ValueError):
except (TypeError, ValueError, IndexError):
# keep errors consistent, we are only expecting a KeyError
raise KeyError

Expand Down

0 comments on commit 27c5c68

Please sign in to comment.