# HG changeset patch # User Marcin Kuzminski # Date 2017-12-03 21:35:29 # Node ID e50c0448b2f6cde1537c166b29f4d0323bfebbde # Parent 20304eec533efe0cbb43e5d3f733acc2e28e1705 integrations: use orderedDict in all integrations for settings. diff --git a/rhodecode/integrations/types/hipchat.py b/rhodecode/integrations/types/hipchat.py --- a/rhodecode/integrations/types/hipchat.py +++ b/rhodecode/integrations/types/hipchat.py @@ -24,8 +24,8 @@ import logging import requests import colander import textwrap +from collections import OrderedDict from mako.template import Template - from rhodecode import events from rhodecode.translation import _ from rhodecode.lib import helpers as h @@ -216,7 +216,7 @@ class HipchatIntegrationType(Integration branch_data = {branch['name']: branch for branch in data['push']['branches']} - branches_commits = {} + branches_commits = OrderedDict() for commit in data['push']['commits']: if commit['branch'] not in branches_commits: branch_commits = {'branch': branch_data[commit['branch']], diff --git a/rhodecode/integrations/types/slack.py b/rhodecode/integrations/types/slack.py --- a/rhodecode/integrations/types/slack.py +++ b/rhodecode/integrations/types/slack.py @@ -28,6 +28,7 @@ import deform import requests import colander from mako.template import Template +from collections import OrderedDict from rhodecode import events from rhodecode.translation import _ @@ -246,7 +247,7 @@ class SlackIntegrationType(IntegrationTy branch_data = {branch['name']: branch for branch in data['push']['branches']} - branches_commits = {} + branches_commits = OrderedDict() for commit in data['push']['commits']: if commit['branch'] not in branches_commits: branch_commits = {'branch': branch_data[commit['branch']],