diff options
| author | Jason Madden <jamadden@gmail.com> | 2018-09-04 16:53:02 -0500 |
|---|---|---|
| committer | Jason Madden <jamadden@gmail.com> | 2018-09-04 16:53:02 -0500 |
| commit | 00f6e0d01e62b4a3acc86aba4948cad31cb219d0 (patch) | |
| tree | 4b905664aea3490302fd1fb5cfc18dce2d218775 | |
| parent | 2213d486aada69d42923318b832c531b76cadcaf (diff) | |
| download | zope-schema-issue35.tar.gz | |
Avoid cycles when shadowing Choice._resolve_vocabulary.issue35
| -rw-r--r-- | src/zope/schema/_field.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zope/schema/_field.py b/src/zope/schema/_field.py index b7c906a..c9dcd4b 100644 --- a/src/zope/schema/_field.py +++ b/src/zope/schema/_field.py @@ -420,8 +420,8 @@ class Choice(Field): 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): |
