Tweak return value for /customers API

This commit is contained in:
Lance Edgar 2019-08-29 20:57:20 -05:00
parent de46dfc4a2
commit 56974ce30f

View file

@ -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,
} }