fix bug: add attr_error only when default value is None. test=develop (#21655)

paddle_tiny_install
liym27 6 years ago committed by GitHub
parent f404157205
commit 1d6f0b40eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -110,7 +110,7 @@ def diff_attr(ori_attrs, new_attrs):
attr_deleted_error_massage.append(attr_name)
for attr_name in attrs_only_in_new:
if not new_attrs.get(attr_name).get(DEFAULT_VALUE):
if new_attrs.get(attr_name).get(DEFAULT_VALUE) == None:
error, attr_error = True, True
attr_added_error_massage.append(attr_name)

Loading…
Cancel
Save