Skip to content

Commit

Permalink
Merge pull request #260 from zopefoundation/py3_sorting
Browse files Browse the repository at this point in the history
Fix sorting of a list of dicts of meta_types
  • Loading branch information
pbauer committed Apr 2, 2018
2 parents 20d92cc + f8386d6 commit 4b194a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OFS/ObjectManager.py
Expand Up @@ -14,6 +14,7 @@
"""

from io import BytesIO
from operator import itemgetter
from logging import getLogger
import copy
import fnmatch
Expand Down Expand Up @@ -210,8 +211,7 @@ def __class_init__(self):
mt.append(t)
except Exception:
pass
mt.sort()
self.meta_types = tuple(mt)
self.meta_types = tuple(sorted(mt, key=itemgetter('name')))

InitializeClass(self)

Expand Down

0 comments on commit 4b194a7

Please sign in to comment.