Call base from_dict in DesignateContext
This changes the from_dict override to call the base class implementation with the Designate-specific keys passed as kwargs. It should prevent issues where a new key is added to the base to_dict function that is not an accepted parameter on the constructor. Change-Id: If75b26bf5a95ae1be679d43a939621037311d2dc Closes-Bug: 1721432
This commit is contained in:
parent
46de766e51
commit
ef4cc46769
|
@ -94,7 +94,11 @@ class DesignateContext(context.RequestContext):
|
|||
|
||||
@classmethod
|
||||
def from_dict(cls, values):
|
||||
return cls(**values)
|
||||
extra_keys = ['original_tenant', 'service_catalog', 'all_tenants',
|
||||
'abandon', 'edit_managed_records', 'tsigkey_id',
|
||||
'hide_counts', 'client_addr']
|
||||
kwargs = {k: values[k] for k in extra_keys}
|
||||
return super(DesignateContext, cls).from_dict(values, **kwargs)
|
||||
|
||||
def elevated(self, show_deleted=None, all_tenants=False,
|
||||
edit_managed_records=False):
|
||||
|
|
Loading…
Reference in New Issue