-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lf 4703 nice to have add base properties to farm addon #3687
Lf 4703 nice to have add base properties to farm addon #3687
Conversation
73712d1
to
c56065a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks pretty good to me!
In what sense does the PUI indicate we need to rethink architecture? I didn't quite follow that part of the PR description but I think I would be interested in hearing about that in tech daily -- maybe Thursday or tomorrow if the dev-design is fast?
The only thing missing that I could spot is that farmAdonModel.getOrganisationIds
(this is called by getEnsembleSensors
) will also need a .whereNotDeleted()
with this change or you'll keep getting back sensors even after deleting the farm_addon
record.
Just that its a one-off thing to need to use so its good to second guess it. Happy to explain the two times I have used it and why I regret the previous use of it -- but think its fine here for now. Thanks for finding will fix! |
…d unused variables error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, that's a good call to keep the old functions compatible until the point at which we remove them! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Description
This PR adds base properties to the
farm_addon
object.Also necessitates the addition of an
id
primary key to distinguish between deleted records.Notes:
soil_amendment_task_products
. Looking back soil amendment task products should not have base properties - it should use hard delete -- so I forget why I added base properties there maybe I was still learning. Here it makes sense to have base properties onfarm_addon
, so the main re-think is about if multiple addons with the same partner should be allowed -- and I think the answer is: in the future we may do that so constraining it for now is ok and can be removed later. We will also not be manipulating multiple records at a time so the drawback is less.Jira link: https://lite-farm.atlassian.net/browse/LF-4703
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: