Skip to content

Commit

Permalink
don't duplicate the extra dict in extra
Browse files Browse the repository at this point in the history
fixes bug 929815

Change-Id: Icfbe9a4b0eb2ef9b24bcf41113a6ec8e636210a9
  • Loading branch information
termie authored and ttx committed Apr 3, 2012
1 parent 1b7aa15 commit ada4021
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions keystone/catalog/backends/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Service(sql.ModelBase, sql.DictBase):
def from_dict(cls, service_dict):
extra = {}
for k, v in service_dict.copy().iteritems():
if k not in ['id', 'type']:
if k not in ['id', 'type', 'extra']:
extra[k] = service_dict.pop(k)

service_dict['extra'] = extra
Expand All @@ -64,7 +64,7 @@ class Endpoint(sql.ModelBase, sql.DictBase):
def from_dict(cls, endpoint_dict):
extra = {}
for k, v in endpoint_dict.copy().iteritems():
if k not in ['id', 'region', 'service_id']:
if k not in ['id', 'region', 'service_id', 'extra']:
extra[k] = endpoint_dict.pop(k)
endpoint_dict['extra'] = extra
return cls(**endpoint_dict)
Expand Down
4 changes: 2 additions & 2 deletions keystone/identity/backends/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def from_dict(cls, user_dict):
extra = {}
for k, v in user_dict.copy().iteritems():
# TODO(termie): infer this somehow
if k not in ['id', 'name']:
if k not in ['id', 'name', 'extra']:
extra[k] = user_dict.pop(k)

user_dict['extra'] = extra
Expand All @@ -88,7 +88,7 @@ def from_dict(cls, tenant_dict):
extra = {}
for k, v in tenant_dict.copy().iteritems():
# TODO(termie): infer this somehow
if k not in ['id', 'name']:
if k not in ['id', 'name', 'extra']:
extra[k] = tenant_dict.pop(k)

tenant_dict['extra'] = extra
Expand Down

0 comments on commit ada4021

Please sign in to comment.