Merge ~blake-rouse/maas:fix-1794634 into maas:master

Proposed by Blake Rouse
Status: Merged
Approved by: Blake Rouse
Approved revision: 25718e67781f6270b754bd286bceff8767fe4ff6
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~blake-rouse/maas:fix-1794634
Merge into: maas:master
Diff against target: 27 lines (+0/-9)
1 file modified
src/maasserver/models/bmc.py (+0/-9)
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+355769@code.launchpad.net

Commit message

Fix LP: #1794634 - Remove the unique_together on the model that was removed in the migration.

Description of the change

This was caused by a bad merge. I had issues with the last branch that landed and had to rebase the branch on top of a new master. I believe that is how this code got back in, as it could not have been present for me to generate the migration.

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Self-approving, as this was a bad merge from the last branch. A migration already exists to remove this unique_together.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/models/bmc.py b/src/maasserver/models/bmc.py
2index 2b80690..00bad58 100644
3--- a/src/maasserver/models/bmc.py
4+++ b/src/maasserver/models/bmc.py
5@@ -142,9 +142,6 @@ class BMC(CleanSave, TimestampedModel):
6 :ivar objects: The :class:`BMCManager`.
7 """
8
9- class Meta(DefaultMeta):
10- unique_together = ("power_type", "power_parameters", "ip_address")
11-
12 objects = Manager()
13
14 bmcs = BMCManager()
15@@ -527,12 +524,6 @@ class Pod(BMC):
16 return interface.node
17 return None
18
19- def unique_error_message(self, model_class, unique_check):
20- if unique_check == ('power_type', 'power_parameters', 'ip_address'):
21- raise ValidationError(
22- 'Pod with type and parameters already exists.')
23- return super(Pod, self).unique_error_message(model_class, unique_check)
24-
25 def sync_hints(self, discovered_hints):
26 """Sync the hints with `discovered_hints`."""
27 try:

Subscribers

People subscribed via source and target branches