Skip to content

Conversation

@frano-m
Copy link
Contributor

@frano-m frano-m commented Oct 27, 2025

Closes #4579.

This pull request refactors the logic for generating export filters in the getExportTerraEntityFilters function to improve clarity and robustness. The main changes involve restructuring how filters are built and handling cases where donor organism type values may be missing.

Improvements to filter construction:

  • Refactored getExportTerraEntityFilters to build the filters array step-by-step instead of using array spread syntax, making the logic clearer and easier to maintain.

Robustness enhancements:

  • Updated donor organism type filter logic to add [null] as a value when no donor organism type values are available, ensuring the filter always has a value.

Feature consistency:

  • Explicitly added the file format filter to the filters array, maintaining consistent export filter behavior.

Copy link
Contributor

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 exporting datasets with 'unspecified' organism_type in AnVIL Explorer would fail. The refactoring improves code clarity by building filters step-by-step and adds robustness by ensuring the donor organism type filter always has a value, using [null] when no organism type values are available.

Key changes:

  • Refactored filter construction from array spread syntax to sequential push operations for better clarity
  • Added fallback to [null] for donor organism type filter when no values are present
  • Added explicit comment documentation for filter additions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@NoopDog NoopDog merged commit a0e58cc into main Oct 27, 2025
3 checks 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.

Error exporting datasets with "Unspecified" organsm_type in Anvil Explorer

3 participants