Skip to content

Commit

Permalink
Avoid setting _default to NOTSET when duplicating ConfigValue objects
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiirola committed Jan 14, 2025
1 parent dcb6102 commit 33a3e96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyomo/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,11 @@ def __call__(
assert default is NOTSET
else:
fields += ('domain',)
kwds['default'] = self.value() if default is NOTSET else default
if default is NOTSET:
default = self.value()
if default is NOTSET:
default = None
kwds['default'] = default
assert implicit is NOTSET
assert implicit_domain is NOTSET
for field in fields:
Expand Down

0 comments on commit 33a3e96

Please sign in to comment.