mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 12:08:40 +02:00
Simplify the empty dictionary additions
This commit is contained in:
parent
431e158531
commit
4d41c3cddc
1 changed files with 2 additions and 4 deletions
|
@ -145,10 +145,8 @@ class DomainNameserversView(DomainPermissionView, FormMixin):
|
|||
initial_data.extend({"server": name} for name, *ip in nameservers)
|
||||
|
||||
# Ensure at least 3 fields, filled or empty
|
||||
if not initial_data:
|
||||
initial_data.extend([{}, {}])
|
||||
elif len(initial_data) == 1:
|
||||
initial_data.extend({})
|
||||
while len(initial_data) < 2:
|
||||
initial_data.append({})
|
||||
|
||||
return initial_data
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue