# HG changeset patch # User Marcin Kuzminski # Date 2018-07-10 16:25:22 # Node ID 33ba326998e7d00bcf41b6f0ebcf758fad25ea66 # Parent 353722546484dd2c63b36c768c686a484969c0e5 api: fix creation of PR with default reviewer rules. diff --git a/rhodecode/model/pull_request.py b/rhodecode/model/pull_request.py --- a/rhodecode/model/pull_request.py +++ b/rhodecode/model/pull_request.py @@ -484,7 +484,7 @@ class PullRequestModel(BaseModel): reviewer.mandatory = mandatory # NOTE(marcink): pick only first rule for now - rule_id = rules[0] if rules else None + rule_id = list(rules)[0] if rules else None rule = RepoReviewRule.get(rule_id) if rule_id else None if rule: review_group = rule.user_group_vote_rule()