mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
Allow new domains to be absolute
Allow the new domain name to be input absolute (with a dot at the end). To keep the rest of the logic working as-is, remove it fairly early in the function. Would have loved to use `str.removesuffix()` but that's python v3.9+.
This commit is contained in:
parent
dac232147e
commit
5036619a67
@ -363,6 +363,9 @@ def add():
|
||||
'errors/400.html',
|
||||
msg="Please enter a valid domain name"), 400
|
||||
|
||||
if domain_name.endswith('.'):
|
||||
domain_name = domain_name[:-1]
|
||||
|
||||
# If User creates the domain, check some additional stuff
|
||||
if current_user.role.name not in ['Administrator', 'Operator']:
|
||||
# Get all the account_ids of the user
|
||||
|
Loading…
Reference in New Issue
Block a user