Merge lp:~lamont/maas/bug-1513485 into lp:~maas-committers/maas/trunk
Proposed by
LaMont Jones
Status: | Merged |
---|---|
Approved by: | LaMont Jones |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4490 |
Proposed branch: | lp:~lamont/maas/bug-1513485 |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
67 lines (+42/-4) 2 files modified
src/maasserver/models/staticipaddress.py (+13/-4) src/maasserver/models/tests/test_staticipaddress.py (+29/-0) |
To merge this branch: | bzr merge lp:~lamont/maas/bug-1513485 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Pontillo (community) | Approve | ||
Review via email: mp+277267@code.launchpad.net |
Commit message
Fix handling of multiple StaticIPAddress rows with empty IP addresses. In some circumstances, (possibly migration from 1.8, or other unknown reasons) there can be multiple StaticIPAddress entries for a subnet with no IP address. Previously, this caused the code to crash on a get_or_create() call.
Description of the change
Migration means that sometimes, there are multiple empty StaticIPAddress entries for a subnet.
To post a comment you must log in.
I'm going to approve this since it's a pretty simple change, but please see address my comments below before landing this.