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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix magic numbers #652

Merged
merged 24 commits into from
Mar 14, 2024
Merged

Fix magic numbers #652

merged 24 commits into from
Mar 14, 2024

Conversation

AndyRae
Copy link
Member

@AndyRae AndyRae commented Mar 13, 2024

Changes

Fixes the hardcoded django content_type ids used in the backend, client, and workers.

This enables the app to be deployed fully working.

The approach has been to make the backend to be responsible for the content_type, and not trust the client, in two ways:

  • When a ScanReportConcept is created through the API (when used by the workers, or the frontend), the content type is passed as a string, this is then used to lookup the content type ID.
  • When a content_type is used for frontend logic, mostly for rendering / filtering, a new API endpoint has been created to get the content type ID.

Closes #637
Closes #641

Large diffs in the Javascript are Prettier working away.

Checks

Important: please complete these before merging.

  • Run migrations, if any.
  • Update changelog.md, including migration instructions if any.
  • Run unit tests.

@AndyRae AndyRae merged commit 01ce633 into devel Mar 14, 2024
2 checks passed
@AndyRae AndyRae deleted the fix/637/15-17-magic-numbers branch March 14, 2024 12:20
@AndyRae AndyRae mentioned this pull request Mar 26, 2024
3 tasks
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.

"Refresh Rules" does not create rules from existing concepts Mapping rules Term Map column returning null
4 participants