From 68e660d74131f92337a37362014056e6390d350f Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Mon, 7 Jun 2021 15:43:30 -0400 Subject: Fix optional params in API, change collaborators to use username Signed-off-by: Sawyer Bergeron Change-Id: Icb20015bd389ff7da3519f9eb596c0100609a29a --- src/booking/quick_deployer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/booking/quick_deployer.py b/src/booking/quick_deployer.py index 65dd9b2..5e5bc8b 100644 --- a/src/booking/quick_deployer.py +++ b/src/booking/quick_deployer.py @@ -219,8 +219,8 @@ def create_from_API(body, user): data = {} data['purpose'] = booking_info['purpose'] data['project'] = booking_info['project'] - data['users'] = [UserProfile.objects.get(pk=user_id) - for user_id in booking_info['collaborators']] + data['users'] = [UserProfile.objects.get(user__username=username) + for username in booking_info['collaborators']] data['hostname'] = booking_info['hostname'] data['length'] = booking_info['length'] data['installer'] = None -- cgit 1.2.3-korg