Skip to content

Properly check for empty custom data#161

Merged
Bash-09 merged 1 commit intomainfrom
Bash/PruneProperly
Jun 29, 2024
Merged

Properly check for empty custom data#161
Bash-09 merged 1 commit intomainfrom
Bash/PruneProperly

Conversation

@Bash-09
Copy link
Copy Markdown
Contributor

@Bash-09 Bash-09 commented Jun 29, 2024

Previously custom_data was considered empty if it was null or an empty string, array or object, however not if the object was a map which contained an empty string. This would result in some player records not being pruned if they had previously had any notes or an alias set, despite not currently storing any useful information because they contained multiple empty strings.

Custom data that looks like this:

"custom_data" : { 
    "alias" : "",
    "playerNote" : ""
}

Would not be pruned, whereas with these changes it does.

@Bash-09
Copy link
Copy Markdown
Contributor Author

Bash-09 commented Jun 29, 2024

Didn't break anything as far as I can tell

@Bash-09 Bash-09 merged commit 3ac6da5 into main Jun 29, 2024
@Bash-09 Bash-09 deleted the Bash/PruneProperly branch June 29, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant