Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make find_field_with_default return json fields without path #2476

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/schema/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ impl Schema {
.or(default_field_opt.map(|field| (field, full_path)))?;
let field_entry = self.get_field_entry(field);
let is_json = field_entry.field_type().value_type() == Type::Json;
if is_json == json_path.is_empty() {
if !is_json && !json_path.is_empty() {
return None;
}
Some((field, json_path))
Expand Down
Loading