-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Scope the packages QuerySet by current project #448 Signed-off-by: Thomas Druez <[email protected]> * Bump scancode to 31.0.0rc2 #448 * The new scancode version provides a fix to the error encountered in #448 * Update expected test results Signed-off-by: Jono Yang <[email protected]> * Ensure package_uid unique and indexed #448 * TODO: Do we want to make blank and null true on the field since we have existing empty values and the pipelines do not set a package_uid when creating a DiscoveredPackage? Signed-off-by: Jono Yang <[email protected]> * Make DiscoveredPackage.package_uid unique within a Project #448 Signed-off-by: Thomas Druez <[email protected]> * Simplify update_or_create_package and fix unit test #448 Add a override option to update_from_data Signed-off-by: Thomas Druez <[email protected]> Co-authored-by: Thomas Druez <[email protected]>
- Loading branch information
Showing
10 changed files
with
70 additions
and
39 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
scanpipe/migrations/0017_alter_discoveredpackage_package_uid_and_more.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 4.0.5 on 2022-06-17 06:58 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('scanpipe', '0016_discoveredpackage_package_uid'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='discoveredpackage', | ||
name='package_uid', | ||
field=models.CharField(blank=True, db_index=True, help_text='Unique identifier for this package.', max_length=1024), | ||
), | ||
migrations.AddConstraint( | ||
model_name='discoveredpackage', | ||
constraint=models.UniqueConstraint(condition=models.Q(('package_uid', ''), _negated=True), fields=('project', 'package_uid'), name='scanpipe_discoveredpackage_unique_package_uid_within_project'), | ||
), | ||
] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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