Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the loading of asset maintenances that are not used by view #12943

Merged

Conversation

marcusmoore
Copy link
Collaborator

Description

In the process of debugging #12934 I noticed that we load asset maintenances and pass them to the view but the table that is rendered in that view doesn't use them and instead hits the api. This PR skips loading those models in the controller and let's the table/api do its thing.

I did some very quick testing on this and it seems good. I can test more thoroughly on Monday unless someone with more confidence merges it first 馃槈

Fixes #12934

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@what-the-diff
Copy link

what-the-diff bot commented Apr 28, 2023

PR Summary

  • Added defaultLoc to asset_maintenances
    This improvement adds a "defaultLoc" field to asset maintenance items, providing better organization and clarity for users.
  • Removed unused code from getAssetMaintenancesReport()
    This change cleans up and optimizes the code, ensuring that only relevant and necessary elements are present in the getAssetMaintenancesReport() function.

@snipe snipe merged commit 914b265 into snipe:develop May 3, 2023
4 checks passed
@marcusmoore marcusmoore deleted the fixes/avoid-loading-unused-models-for-report branch May 3, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants