From 4069aad2d076cab1ce3d3e3f59a340112f96babd Mon Sep 17 00:00:00 2001 From: Pnu <6069449+pnu-s@users.noreply.github.com> Date: Thu, 18 Jan 2024 07:14:46 +0100 Subject: [PATCH] feat: Remove name and firstname from API key creation (#602) --- exodus/trackers/templates/new_api_key.html | 8 -------- exodus/trackers/views.py | 5 +---- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/exodus/trackers/templates/new_api_key.html b/exodus/trackers/templates/new_api_key.html index 482b5682..78f412b7 100644 --- a/exodus/trackers/templates/new_api_key.html +++ b/exodus/trackers/templates/new_api_key.html @@ -25,14 +25,6 @@

New API key

-
- - -
-
- - -
diff --git a/exodus/trackers/views.py b/exodus/trackers/views.py index 30b74210..952c6d5e 100644 --- a/exodus/trackers/views.py +++ b/exodus/trackers/views.py @@ -81,18 +81,15 @@ def new_api_key(request): if request.method == 'POST': try: password = ''.join(random.choice(string.ascii_lowercase) for i in range(24)) + third_parties_group = Group.objects.get(name='third-parties') new_user = User.objects.create_user( username=request.POST.get('username'), password=password, email=request.POST.get('email'), - first_name=request.POST.get('first-name'), - last_name=request.POST.get('last-name') ) - third_parties_group = Group.objects.get(name='third-parties') third_parties_group.user_set.add(new_user) - api_key = Token.objects.get(user=new_user) data['api_key'] = api_key