Skip to content

Commit aec5afd

Browse files
committed
Fix if-else in onyOf block
1 parent cd1f06e commit aec5afd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
=== UNRELEASED
22

33
* Fix nested oneOf and anyOf
4+
* Fix if-else block in anyOf block
5+
* Add option to pass custom formats in generated code
46

57

68
=== 2.15.1 (2021-05-05)

fastjsonschema/draft07.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def generate_if_then_else(self):
4646
4747
Valid values are any between -10 and 0 or any multiplication of two.
4848
"""
49-
with self.l('try:'):
49+
with self.l('try:', optimize=False):
5050
self.generate_func_code_block(
5151
self._definition['if'],
5252
self._variable,

0 commit comments

Comments
 (0)