diff options
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/models.py b/src/api/models.py index 231ae31..960fc26 100644 --- a/src/api/models.py +++ b/src/api/models.py @@ -190,7 +190,9 @@ class LabManager(object): return json.dumps({"users": userlist}) def get_user(self, user_id): - profile = get_object_or_404(UserProfile, pk=user_id) + user = User.objects.get(pk=user_id) + + profile = get_object_or_404(UserProfile, user=user) return json.dumps(self.format_user(profile)) |