Skip to content

Full soil info isn't returned when FullSoil radius is specified#44

Merged
ric394 merged 2 commits intoAPSIMInitiative:masterfrom
hol353:paw
Sep 12, 2025
Merged

Full soil info isn't returned when FullSoil radius is specified#44
ric394 merged 2 commits intoAPSIMInitiative:masterfrom
hol353:paw

Conversation

@hol353
Copy link
Copy Markdown
Contributor

@hol353 hol353 commented Sep 12, 2025

Resolves #43

@ric394 ric394 requested a review from Copilot September 12, 2025 03:49
Copy link
Copy Markdown

Copilot AI left a comment

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 an issue where full soil information wasn't being returned when a FullSoil radius was specified in API queries. The fix ensures that all related soil data (organic matter, water properties, and analysis) is properly included in the database query results.

  • Added Entity Framework Include statements to load related soil data
  • Added unit tests to verify that all soil properties are populated in the response

Reviewed Changes

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

File Description
API/Services/SoilServices.cs Added Include statements for SoilOrganicMatter, SoilWater, and Analysis to ensure complete soil data is loaded
Tests/UnitTest.cs Added assertions to verify that soil properties are not null in radius-based queries

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

@ric394 ric394 merged commit 4c39dfb into APSIMInitiative:master Sep 12, 2025
1 check passed
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.

Full soil info isn't returned when FullSoil radius is specified

3 participants