Skip to content

fix(tapd): fix panic when casting fields#8337

Merged
d4x1 merged 2 commits into
mainfrom
fix-0317
Mar 17, 2025
Merged

fix(tapd): fix panic when casting fields#8337
d4x1 merged 2 commits into
mainfrom
fix-0317

Conversation

@d4x1
Copy link
Copy Markdown
Contributor

@d4x1 d4x1 commented Mar 17, 2025

⚠️ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

  • I have read through the Contributing Documentation.
  • I have added relevant tests.
  • I have added relevant documentation.
  • I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

What does this PR do?
Fix panic when casting fields in tapd.

In tapd, some datas are like:

"field_changes":
        [
            {
                "field": "secret_root_id",
                "field_label": "label_name",
                "value_after":
                {
                    "allow_list": "dw;1234;dw",
                    "secret_root_id": "1156232825001092299",
                    "participant_fields": "1"
                },
                "value_before":
                {
                    "allow_list": "",
                    "secret_root_id": 0,
                    "participant_fields": "0"
                },
                "secret_root_id": "1234",
                "value_after_parsed":
                {
                    "allow_list": "dw;123;dw",
                    "secret_root_id": "12345",
                    "participant_fields": "1"
                },
                "value_before_parsed":
                {
                    "allow_list": "",
                    "secret_root_id": "0",
                    "participant_fields": "0"
                }
            }
        ]

Field participant_fields can be float or string type depending on its location. This PR just handles these cases.

Does this close any open issues?

Closes N/A

Screenshots

Include any relevant screenshots here.

Other Information

Any other information that is important to this PR.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. component/plugins This issue or PR relates to plugins pr-type/bug-fix This PR fixes a bug labels Mar 17, 2025
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Mar 17, 2025
@d4x1 d4x1 merged commit 8240c8d into main Mar 17, 2025
@d4x1 d4x1 deleted the fix-0317 branch March 17, 2025 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/plugins This issue or PR relates to plugins lgtm This PR has been approved by a maintainer pr-type/bug-fix This PR fixes a bug size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants