diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2021-06-07 15:43:30 -0400 |
---|---|---|
committer | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2021-06-07 15:43:30 -0400 |
commit | 68e660d74131f92337a37362014056e6390d350f (patch) | |
tree | 6223c4445220dd1bc9f15810c9e5549e206c322c /src/booking | |
parent | ced6bf516bb08073288d4ad0a47d136a504a95c8 (diff) |
Fix optional params in API, change collaborators to use username
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Change-Id: Icb20015bd389ff7da3519f9eb596c0100609a29a
Diffstat (limited to 'src/booking')
-rw-r--r-- | src/booking/quick_deployer.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |