Associate a token with the user that created the application
This commit is contained in:
parent
490eb6cbff
commit
ce0577744b
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue