Tweak return value for /customers API
This commit is contained in:
parent
de46dfc4a2
commit
56974ce30f
|
@ -26,6 +26,8 @@ Tailbone Web API - Customer Views
|
||||||
|
|
||||||
from __future__ import unicode_literals, absolute_import
|
from __future__ import unicode_literals, absolute_import
|
||||||
|
|
||||||
|
import six
|
||||||
|
|
||||||
from rattail.db import model
|
from rattail.db import model
|
||||||
|
|
||||||
from cornice.resource import resource, view
|
from cornice.resource import resource, view
|
||||||
|
@ -41,6 +43,7 @@ class CustomerView(APIMasterView):
|
||||||
def normalize(self, customer):
|
def normalize(self, customer):
|
||||||
return {
|
return {
|
||||||
'uuid': customer.uuid,
|
'uuid': customer.uuid,
|
||||||
|
'_str': six.text_type(customer),
|
||||||
'id': customer.id,
|
'id': customer.id,
|
||||||
'name': customer.name,
|
'name': customer.name,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue