Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

fix: Fix zeros being loaded instead of fert names #321

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

GDamaso
Copy link
Contributor

@GDamaso GDamaso commented Aug 5, 2024

Description

Simple ammend to the loading ticket, parseInt was missing a radix which husky caught and stopped the commit from being pushed. Didn't notice it wasn't added before merging, resulting in this quick pr 😄

The fix is for zeros being loaded in place of fertilizer names. To fix it I simplified the code I realised was overcomplicated and not working properly. It required a fallback since it was using a find(), which could return undefined. The fallback was zero. Now there's no need for it since fertilizers were updated to match nmp id's, making it easier to assign their names according to their id's.

Type of changes

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@GDamaso GDamaso linked an issue Aug 5, 2024 that may be closed by this pull request
3 tasks
@GDamaso GDamaso changed the title Fix zeros being loaded instead of fert names fix: Fix zeros being loaded instead of fert names Aug 5, 2024
@GDamaso GDamaso marked this pull request as ready for review August 5, 2024 02:47
Copy link
Contributor

@kcaparas1630 kcaparas1630 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@GDamaso GDamaso merged commit fd039eb into main Aug 5, 2024
24 of 26 checks passed
@GDamaso GDamaso deleted the BB-320-fix-fertilizer-names-loading-0 branch August 5, 2024 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix fertilizer names loading 0
2 participants