Conversation
Signed-off-by: 0ssigeno <[email protected]>
Signed-off-by: 0ssigeno <[email protected]>
|
The errors in the test are not related to the pr, you can review it |
There was a problem hiding this comment.
Some things to consider. View full project report here.
Signed-off-by: 0ssigeno <[email protected]>
There was a problem hiding this comment.
Worth considering. View full project report here.
| data_model_content_type = models.ForeignKey( | ||
| ContentType, | ||
| on_delete=models.CASCADE, | ||
| limit_choices_to={ | ||
| "app_label": "data_model_manager", | ||
| }, | ||
| null=True, | ||
| editable=False | ||
| ) |
There was a problem hiding this comment.
| data_model_content_type = models.ForeignKey( | |
| ContentType, | |
| on_delete=models.CASCADE, | |
| limit_choices_to={ | |
| "app_label": "data_model_manager", | |
| }, | |
| null=True, | |
| editable=False | |
| ) | |
| data_model_content_type = models.ForeignKey( | |
| ContentType, | |
| on_delete=models.CASCADE, | |
| limit_choices_to={"app_label": "data_model_manager"}, | |
| null=True, | |
| editable=False, | |
| blank=True, | |
| ) |
Django automatically creates a related_name if it's not set. If it were set then a more readable and explicit relationship is set up. More details.
Expect unwanted behavior if null and blank are different values: null controls if the database allows no value for data_model_content_type and blank controls if the application allows no value for data_model_content_type. Consider setting null and blank to the same value for data_model_content_type. Explained here.
| null=True, | ||
| editable=False | ||
| ) | ||
| data_model_object_id = models.IntegerField(null=True, editable=False) |
There was a problem hiding this comment.
| data_model_object_id = models.IntegerField(null=True, editable=False) | |
| data_model_object_id = models.IntegerField(null=True, editable=False, blank=True) |
Same as above: Maybe setting null and blank to the same value.
(Please add to the PR name the issue/s that this PR would close if merged by using a Github keyword. Example:
<feature name>. Closes #999. If your PR is made by a single commit, please add that clause in the commit too. This is all required to automate the closure of related issues.)Description
Please include a summary of the change and link to the related issue.
Type of change
Please delete options that are not relevant.
Checklist
developdumpplugincommand and added it in the project as a data migration. ("How to share a plugin with the community")test_files.zipand you added the default tests for that mimetype in test_classes.py.FREE_TO_USE_ANALYZERSplaybook by following this guide.urlthat contains this information. This is required for Health Checks._monkeypatch()was used in its class to apply the necessary decorators.MockUpResponseof the_monkeypatch()method. This serves us to provide a valid sample for testing.Black,Flake,Isort) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.testsfolder). All the tests (new and old ones) gave 0 errors.DeepSource,Django Doctorsor other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.Important Rules