migration: fix unicode problem on 4.17.0 migration
This commit is contained in:
parent
65f5964cf6
commit
cc4099272e
2 changed files with 2 additions and 5 deletions
|
|
@ -8,6 +8,7 @@ from sqlalchemy import String, Column
|
|||
from sqlalchemy.sql import text
|
||||
|
||||
from rhodecode.lib.dbmigrate.versions import _reset_base
|
||||
from rhodecode.lib.utils2 import safe_str
|
||||
from rhodecode.model import meta, init_model_encryption
|
||||
from rhodecode.model.db import RepoGroup
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ def downgrade(migrate_engine):
|
|||
def _generate_repo_group_name_hashes(models, op, session):
|
||||
repo_groups = models.RepoGroup.get_all()
|
||||
for repo_group in repo_groups:
|
||||
print(repo_group.group_name)
|
||||
print(safe_str(repo_group.group_name))
|
||||
hash_ = RepoGroup.hash_repo_group_name(repo_group.group_name)
|
||||
params = {'hash': hash_, 'id': repo_group.group_id}
|
||||
query = text(
|
||||
|
|
|
|||
|
|
@ -33,7 +33,3 @@ def upgrade(migrate_engine):
|
|||
|
||||
def downgrade(migrate_engine):
|
||||
pass
|
||||
|
||||
|
||||
def _generate_repo_group_name_hashes(models, op, session):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue