Skip to content

Commit

Permalink
fix: OpenAPI create application randomly generate k8sname (#1356)
Browse files Browse the repository at this point in the history
Co-authored-by: 曲源成 <[email protected]>
  • Loading branch information
quyuancheng and 曲源成 authored Jul 13, 2023
1 parent 8989986 commit 6ee1000
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openapi/views/apps/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from rest_framework import status
from rest_framework.response import Response
from www.apiclient.regionapi import RegionInvokeApi
from www.utils.crypt import make_uuid
from www.utils.return_message import general_message

region_api = RegionInvokeApi()
Expand Down Expand Up @@ -86,6 +87,7 @@ def post(self, request, *args, **kwargs):
data["app_name"],
data.get("app_note"),
self.user.get_username(),
k8s_app="app-" + make_uuid()[:6],
)
re = AppBaseInfoSerializer(group_info)
return Response(re.data, status=status.HTTP_201_CREATED)
Expand Down

0 comments on commit 6ee1000

Please sign in to comment.