Ignore irrelevant secgroup form field errors
When cleaning data from in the security group rule form, remove any associated error messages that are not related to the actual fields being saved. If we are setting a value derived from another field, also delete the error message associated with that field. Change-Id: I1eb4835ea2368b62374f230c6293062a2340980d Closes-Bug:1237128
This commit is contained in:
parent
5eaa0d1e12
commit
03e516fa6b
|
@ -69,7 +69,7 @@ def create_stubs(stubs_to_create={}):
|
|||
|
||||
def inner_stub_out(fn):
|
||||
@wraps(fn)
|
||||
def instance_stub_out(self):
|
||||
def instance_stub_out(self, *args, **kwargs):
|
||||
for key in stubs_to_create:
|
||||
if not (isinstance(stubs_to_create[key], tuple) or
|
||||
isinstance(stubs_to_create[key], list)):
|
||||
|
@ -80,7 +80,7 @@ def create_stubs(stubs_to_create={}):
|
|||
|
||||
for value in stubs_to_create[key]:
|
||||
self.mox.StubOutWithMock(key, value)
|
||||
return fn(self)
|
||||
return fn(self, *args, **kwargs)
|
||||
return instance_stub_out
|
||||
return inner_stub_out
|
||||
|
||||
|
|
Loading…
Reference in New Issue