diff options
Diffstat (limited to 'src/api/models.py')
-rw-r--r-- | src/api/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/models.py b/src/api/models.py index ec163a1..1f03deb 100644 --- a/src/api/models.py +++ b/src/api/models.py @@ -378,17 +378,17 @@ class GeneratedCloudConfig(models.Model): """ user_array = ["default"] users = list(self.booking.collaborators.all()) - users.append(self.booking.owner.userprofile) + users.append(self.booking.owner) for collaborator in users: userdict = {} # TODO: validate if usernames are valid as linux usernames (and provide an override potentially) - userdict['name'] = self._normalize_username(collaborator.user.username) + userdict['name'] = self._normalize_username(collaborator.username) userdict['groups'] = "sudo" userdict['sudo'] = "ALL=(ALL) NOPASSWD:ALL" - userdict['ssh_authorized_keys'] = [self._get_ssh_string(collaborator.user.username)] + userdict['ssh_authorized_keys'] = [self._get_ssh_string(collaborator.username)] user_array.append(userdict) |