Skip to content

fix(list): removes null values in included records - #147

Merged
EnkiP merged 5 commits into
mainfrom
fix/null-values-in-included-records
Oct 20, 2025
Merged

EnkiP merged 5 commits into
mainfrom
fix/null-values-in-included-records

Conversation

@EnkiP

@EnkiP EnkiP commented Oct 13, 2025

Copy link
Copy Markdown
Member

Definition of Done

ticket clickup: https://app.clickup.com/t/86c5ww31k

General

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Test manually the implemented changes
  • Validate the code quality (indentation, syntax, style, simplicity, readability)

Security

  • Consider the security impact of the changes made

@qltysh

qltysh Bot commented Oct 13, 2025

Copy link
Copy Markdown

2 new issues

Tool Category Rule Count
qlty Structure High total complexity (count = 59) 1
qlty Structure Function with high complexity (count = 11): attributes 1

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

@qltysh

qltysh Bot commented Oct 13, 2025

Copy link
Copy Markdown

Diff Coverage: The code coverage on the diff in this pull request is 100.0%.

Total Coverage: This PR will increase coverage by 0.13%.

File Coverage Changes
Path File Coverage Δ Indirect
packages/forest_admin_agent/lib/forest_admin_agent/serializer/forest_serializer.rb 0.2
packages/forest_admin_datasource_active_record/lib/forest_admin_datasource_active_record/utils/query.rb 13.1
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

@EnkiP
EnkiP requested a review from Copilot October 14, 2025 08:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes null value handling in serialized responses by preventing null relationships from being included in the JSON output. The changes remove the explicit data: nil entries from relationship objects when the relationship is empty or null.

  • Removes null relationship data from serialized output instead of explicitly setting it to nil
  • Updates attribute serialization to skip nil values for included records unless the key explicitly exists
  • Modifies test expectations to reflect the absence of null data fields

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/forest_admin_agent/lib/forest_admin_agent/serializer/forest_serializer.rb Updates serialization logic to omit null relationships and attributes instead of explicitly setting them to nil
packages/forest_admin_agent/spec/lib/forest_admin_agent/routes/resources/store_spec.rb Updates test expectations to remove assertions for null data fields in relationships

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@EnkiP
EnkiP merged commit 26cf793 into main Oct 20, 2025
37 checks passed
forest-bot added a commit that referenced this pull request Oct 20, 2025
## [1.8.7](v1.8.6...v1.8.7) (2025-10-20)

### Bug Fixes

* **list:** removes null values in included records ([#147](#147)) ([26cf793](26cf793))
@forest-bot

Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.8.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Scra3 pushed a commit that referenced this pull request Oct 21, 2025
## [1.8.7](v1.8.6...v1.8.7) (2025-10-20)

### Bug Fixes

* **list:** removes null values in included records ([#147](#147)) ([26cf793](26cf793))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants