Mercurial > kallithea
changeset 6034:42976e0d4e2f
db: make repo creation state constants unicode - avoid conversion in sqlalchemy
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 28 Jul 2016 16:28:34 +0200 |
parents | a922e91a4f02 |
children | 47c672583fc4 |
files | kallithea/model/db.py kallithea/templates/data_table/_dt_elements.html |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/model/db.py Thu Jul 28 16:28:34 2016 +0200 +++ b/kallithea/model/db.py Thu Jul 28 16:28:34 2016 +0200 @@ -969,9 +969,9 @@ DEFAULT_CLONE_URI = '{scheme}://{user}@{netloc}/{repo}' DEFAULT_CLONE_URI_ID = '{scheme}://{user}@{netloc}/_{repoid}' - STATE_CREATED = 'repo_state_created' - STATE_PENDING = 'repo_state_pending' - STATE_ERROR = 'repo_state_error' + STATE_CREATED = u'repo_state_created' + STATE_PENDING = u'repo_state_pending' + STATE_ERROR = u'repo_state_error' repo_id = Column(Integer(), primary_key=True) repo_name = Column(Unicode(255), nullable=False, unique=True)
--- a/kallithea/templates/data_table/_dt_elements.html Thu Jul 28 16:28:34 2016 +0200 +++ b/kallithea/templates/data_table/_dt_elements.html Thu Jul 28 16:28:34 2016 +0200 @@ -135,9 +135,9 @@ <%def name="repo_state(repo_state)"> <div> - %if repo_state == 'repo_state_pending': + %if repo_state == u'repo_state_pending': <div class="btn btn-mini btn-info disabled">${_('Creating')}</div> - %elif repo_state == 'repo_state_created': + %elif repo_state == u'repo_state_created': <div class="btn btn-mini btn-success disabled">${_('Created')}</div> %else: <div class="btn btn-mini btn-danger disabled" title="${repo_state}">invalid</div>