diff --git a/tailbone/api/upgrades.py b/tailbone/api/upgrades.py index 34415002..28bea59c 100644 --- a/tailbone/api/upgrades.py +++ b/tailbone/api/upgrades.py @@ -26,6 +26,8 @@ Tailbone Web API - Upgrade Views from __future__ import unicode_literals, absolute_import +import six + from rattail.db import model from tailbone.api import APIMasterView @@ -40,8 +42,8 @@ class UpgradeView(APIMasterView): 'created': upgrade.created.isoformat(), 'description': upgrade.description, 'enabled': upgrade.enabled, - # 'status_code': upgrade.status_code, - 'status_code': self.enum.UPGRADE_STATUS[upgrade.status_code], + 'status_code': self.enum.UPGRADE_STATUS.get(upgrade.status_code, + six.text_type(upgrade.status_code)), 'executed': upgrade.executed.isoformat() if upgrade.executed else None, # 'executed_by': }