Commit 14111103 authored by Arnaud Fontaine's avatar Arnaud Fontaine

py3: keys() returns a dict_keys not supporting Indexing.

parent 40086bc9
...@@ -104,6 +104,8 @@ import zope.interface ...@@ -104,6 +104,8 @@ import zope.interface
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
from zLOG import LOG, INFO, ERROR, WARNING from zLOG import LOG, INFO, ERROR, WARNING
import six
_MARKER = [] _MARKER = []
class PersistentContainer(Persistent): class PersistentContainer(Persistent):
...@@ -1887,6 +1889,9 @@ class Base( ...@@ -1887,6 +1889,9 @@ class Base(
if 'Owner' in rolesForPermissionOn(Permissions.View, self): if 'Owner' in rolesForPermissionOn(Permissions.View, self):
owner_list = self.users_with_local_role('Owner') owner_list = self.users_with_local_role('Owner')
if owner_list: if owner_list:
if six.PY3:
# keys() returns a dict_keys not supporting Indexing
owner_list = list(owner_list)
return owner_list[0] return owner_list[0]
# Private accessors for the implementation of relations based on # Private accessors for the implementation of relations based on
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment