fix Domain.generate_ns_secret() storing bytes object into Domain.nameserver_update_secret instead of a string
This commit is contained in:
parent
0a625d6853
commit
a8a6a208b1
@ -21,6 +21,7 @@ New Features:
|
||||
Fixes:
|
||||
|
||||
- fixed misc. crashes
|
||||
- fixed Domain.generate_ns_secret() storing bytes object into Domain.nameserver_update_secret leading to trying to insert the string representation of the bytes object, so 91 characters in a varchar(88)
|
||||
|
||||
Other changes:
|
||||
|
||||
|
@ -141,7 +141,7 @@ class Domain(models.Model):
|
||||
user_model = get_user_model()
|
||||
secret = user_model.objects.make_random_password(length=bitlength // 8)
|
||||
secret = secret.encode('utf-8')
|
||||
self.nameserver_update_secret = secret_base64 = base64.b64encode(secret)
|
||||
self.nameserver_update_secret = secret_base64 = base64.b64encode(secret).decode('utf-8')
|
||||
self.save()
|
||||
return secret_base64
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user