Skip to content

Commit

Permalink
Fix if-else in onyOf block
Browse files Browse the repository at this point in the history
  • Loading branch information
horejsek committed Dec 12, 2021
1 parent cd1f06e commit aec5afd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
=== UNRELEASED

* Fix nested oneOf and anyOf
* Fix if-else block in anyOf block
* Add option to pass custom formats in generated code


=== 2.15.1 (2021-05-05)
Expand Down
2 changes: 1 addition & 1 deletion fastjsonschema/draft07.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def generate_if_then_else(self):
Valid values are any between -10 and 0 or any multiplication of two.
"""
with self.l('try:'):
with self.l('try:', optimize=False):
self.generate_func_code_block(
self._definition['if'],
self._variable,
Expand Down

0 comments on commit aec5afd

Please sign in to comment.