From 6b2dc410b16f84e1649c654cb7a98d9509eb9f56 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 07 2016 13:15:10 +0000 Subject: Ensure when loading the ACLs to the DB, we keep the order the same This is most useful for the tests ensuring the acl ID 1 is always the same --- diff --git a/pagure/lib/model.py b/pagure/lib/model.py index bf4167f..4ba212f 100644 --- a/pagure/lib/model.py +++ b/pagure/lib/model.py @@ -123,7 +123,7 @@ def create_default_status(session, acls=None): session.rollback() ERROR_LOG.debug('Type %s could not be added', grptype) - for acl in acls or {}: + for acl in sorted(acls) or {}: item = ACL( name=acl, description=acls[acl]