Skip to content

Commit

Permalink
fix: Added default value for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Mar 11, 2024
1 parent 4d58b93 commit a2fd250
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion terraso_backend/apps/auth/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def create_test_access_token(self, user):
raise ValueError("User is not a test user")
return self.create_token(user, None, {"test": True, "access": True})

def create_access_token(self, user, created_with_service):
def create_access_token(self, user, created_with_service=None):
return self.create_token(
user,
self.JWT_ACCESS_EXP_DELTA_SECONDS,
Expand Down
2 changes: 1 addition & 1 deletion terraso_backend/apps/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def post(self, request, *args, **kwargs):
return HttpResponse("OK", status=200)


def terraso_login(request, user, created_with_service):
def terraso_login(request, user, created_with_service=None):
access_token = jwt_service.create_access_token(user, created_with_service)
refresh_token = jwt_service.create_refresh_token(user)
dj_login(request, user, backend="django.contrib.auth.backends.ModelBackend")
Expand Down

0 comments on commit a2fd250

Please sign in to comment.