Skip to content

Commit

Permalink
fix: allow cloning field value of 0 (#16741)
Browse files Browse the repository at this point in the history
* fix: allow cloning field value of 0

* Fix evaluation of False value

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
  • Loading branch information
llamafilm and jeremystretch authored Jul 1, 2024
1 parent a12259f commit e259658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/utilities/querydict.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def prepare_cloned_fields(instance):
for key, value in attrs.items():
if type(value) in (list, tuple):
params.extend([(key, v) for v in value])
elif value not in (False, None):
elif value is not False and value is not None:
params.append((key, value))
else:
params.append((key, ''))
Expand Down

0 comments on commit e259658

Please sign in to comment.