Associate a token with the user that created the application
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
def set_user_on_application_token(sender, **kwargs):
|
def set_user_on_application_token(sender, **kwargs):
|
||||||
instance = kwargs['instance']
|
instance = kwargs['instance']
|
||||||
if kwargs['created'] and not instance.user:
|
if kwargs['created'] and not instance.user:
|
||||||
instance.user = sender.user.get_queryset().first()
|
instance.user = instance.application.user
|
||||||
instance.save()
|
instance.save()
|
||||||
|
Reference in New Issue
Block a user