From ce0577744b753cd09a636e29694a4ab625493deb Mon Sep 17 00:00:00 2001 From: Xeryus Stokkel Date: Mon, 17 Jan 2022 14:18:43 +0100 Subject: [PATCH] Associate a token with the user that created the application --- scim_app/core/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scim_app/core/signals.py b/scim_app/core/signals.py index ff4ce38..c87c020 100644 --- a/scim_app/core/signals.py +++ b/scim_app/core/signals.py @@ -1,5 +1,5 @@ def set_user_on_application_token(sender, **kwargs): instance = kwargs['instance'] if kwargs['created'] and not instance.user: - instance.user = sender.user.get_queryset().first() + instance.user = instance.application.user instance.save()