Skip to content

Commit

Permalink
Add creator to create_service_account
Browse files Browse the repository at this point in the history
Add missing parameter whe calling the ServiceAccount's .create function.
Error raised after rebase.

Refs. TS-2320
  • Loading branch information
Roffenlund committed Feb 20, 2025
1 parent a5fa14c commit 64f90b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion django/thunderstore/api/cyberstorm/views/service_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ def perform_create(self, serializer: CreateServiceAccountSerializer):
serializer.instance = service_account_data

def create_service_account(self, nickname: str):
service_account, token = ServiceAccount.create(self.team, nickname)
service_account, token = ServiceAccount.create(
owner=self.team,
nickname=nickname,
creator=self.request.user,
)

return {
"nickname": service_account.nickname,
"team_name": service_account.owner.name,
Expand Down
2 changes: 1 addition & 1 deletion django/thunderstore/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
CommunityAPIView,
CommunityFiltersAPIView,
CommunityListAPIView,
DeprecatePackageAPIView,
CreateServiceAccountAPIView,
DeleteServiceAccountAPIView,
DeprecatePackageAPIView,
PackageListingAPIView,
PackageListingByCommunityListAPIView,
PackageListingByDependencyListAPIView,
Expand Down

0 comments on commit 64f90b3

Please sign in to comment.