# HG changeset patch # User Mads Kiilerich # Date 1469716114 -7200 # Node ID 42976e0d4e2fb439208b8d10f75aaf04a2479475 # Parent a922e91a4f0212fa1e0766a7cbd304605cc0acdf db: make repo creation state constants unicode - avoid conversion in sqlalchemy diff -r a922e91a4f02 -r 42976e0d4e2f kallithea/model/db.py --- 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) diff -r a922e91a4f02 -r 42976e0d4e2f kallithea/templates/data_table/_dt_elements.html --- 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)">
- %if repo_state == 'repo_state_pending': + %if repo_state == u'repo_state_pending':
${_('Creating')}
- %elif repo_state == 'repo_state_created': + %elif repo_state == u'repo_state_created':
${_('Created')}
%else:
invalid