Commit 28923b29 authored by Lukas Burgey's avatar Lukas Burgey

Add password upgrade for clients

parent 77c2f178
......@@ -625,6 +625,12 @@ class DeploymentTaskItem(models.Model):
# RECEIVERS
#
@receiver(post_save, sender=User)
def upgrade_password(sender, instance=None, created=False, **kwargs):
if created and instance is not None and instance.user_type == 'apiclient':
instance.set_password(instance.password)
instance.save()
@receiver(post_save, sender=User)
def deactivate_user(sender, instance=None, created=False, **kwargs):
if created:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment