Fix bug with products view config

This commit is contained in:
Lance Edgar 2017-10-20 11:51:07 -07:00
parent cddb05d8fc
commit 855153f121

View file

@ -542,6 +542,11 @@ class ProductsView(MasterView):
@classmethod
def defaults(cls, config):
cls._product_defaults(config)
cls._defaults(config)
@classmethod
def _product_defaults(cls, config):
route_prefix = cls.get_route_prefix()
url_prefix = cls.get_url_prefix()
template_prefix = cls.get_template_prefix()
@ -569,8 +574,6 @@ class ProductsView(MasterView):
config.add_view(cls, attr='search', route_name='products.search',
renderer='json', permission='products.view')
cls._defaults(config)
# product image
config.add_route('products.image', '/products/{uuid}/image')
config.add_view(cls, attr='image', route_name='products.image')