Conversation
| migrations.AddField( | ||
| model_name='multilayerdimension', | ||
| name='layer', | ||
| field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='layers.layer'), |
There was a problem hiding this comment.
Using an empty string as the default for a ForeignKey is likely to cause issues since it expects an integer or a valid instance reference. Consider using a proper default value (e.g., None or a valid pk) or handling it via a custom migration data migration.
Suggested change
| field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='layers.layer'), | |
| field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='layers.layer'), |
Add log before error Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ntroduce essential configurations for CORS and testing
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pollardld
commented
Apr 11, 2025
Member
Author
pollardld
left a comment
There was a problem hiding this comment.
Note to self: in the future, more frequent pull requests will allow for quicker and, likely, more accurate reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Portal Sync - Merge 2025
This pull request includes several important changes to the project, focusing on adding CORS support, updating the CI workflow, and enhancing test coverage reporting. Additionally, a new management command for updating layer HTTP status has been added.
CORS Support:
corsheaderstoINSTALLED_APPSandCorsMiddlewaretoMIDDLEWAREin the settings file. Configured CORS allowed origins and whitelist to support local development. (.github/.github/settings.py)CI Workflow Updates:
Tests, which includes setting up Python, installing dependencies, running tests, and creating a coverage badge. (.github/.github/workflows/django.yml) [1] [2]Test Coverage:
coveragepackage totest_requirements.txtto enable test coverage reporting. (ci_testing/test_requirements.txt)README.mdto include badges for test build status and coverage. (README.md)Management Command:
update_least_recent_layer_http_status.pyto check and update the HTTP status of the least recently checked layer. (layers/management/commands/update_least_recent_layer_http_status.py)