Skip to content

Commit

Permalink
Avoid cycles when shadowing Choice._resolve_vocabulary.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Sep 4, 2018
1 parent 2213d48 commit 00f6e0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zope/schema/_field.py
Expand Up @@ -420,8 +420,8 @@ def bind(self, context):
clone = super(Choice, self).bind(context)
# Eagerly get registered vocabulary if needed;
# once that's done, just return it
clone.vocabulary = clone._resolve_vocabulary(None)
clone._resolve_vocabulary = lambda value: clone.vocabulary
vocabulary = clone.vocabulary = clone._resolve_vocabulary(None)
clone._resolve_vocabulary = lambda value: vocabulary
return clone

def fromUnicode(self, str):
Expand Down

0 comments on commit 00f6e0d

Please sign in to comment.