Change from_db_model to create the correct uri
Change-Id: Idbf61639854029b6d5003f58baaae171c0b3a817 Closes-Bug: #1285017
This commit is contained in:
@@ -46,7 +46,7 @@ class Base(wtypes.Base):
|
||||
def from_db_model(cls, m, host_url):
|
||||
json = m.as_dict()
|
||||
json['type'] = m.__tablename__
|
||||
json['uri'] = '%s/v1/%s/%s' % (host_url, json['type'], m.uuid)
|
||||
json['uri'] = '%s/v1/%s/%s' % (host_url, m.__resource__, m.uuid)
|
||||
del json['id']
|
||||
return cls(**(json))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user