Merge "[placement] quash unicode warning with shared provider"

This commit is contained in:
Jenkins 2017-07-28 21:56:34 +00:00 committed by Gerrit Code Review
commit 008bc0b971
1 changed files with 3 additions and 1 deletions

View File

@ -738,7 +738,9 @@ def _get_providers_with_shared_capacity(ctx, rc_id, amount):
rp_to_rpt_join, t_tbl,
sa.and_(
rpt_tbl.c.trait_id == t_tbl.c.id,
t_tbl.c.name == os_traits.MISC_SHARES_VIA_AGGREGATE,
# The traits table wants unicode trait names, but os_traits
# presents native str, so we need to cast.
t_tbl.c.name == six.text_type(os_traits.MISC_SHARES_VIA_AGGREGATE),
),
)