File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -675,9 +675,9 @@ def __init__(
675675
676676 scancodeio = ScanCodeIO (user .dataspace )
677677 self .packages = scancodeio .fetch_project_packages (self .project_uuid )
678- if not self .packages :
679- raise Exception ("Packages could not be fetched from ScanCode.io" )
680678 self .dependencies = scancodeio .fetch_project_dependencies (self .project_uuid )
679+ if not self .packages and not self .dependencies :
680+ raise Exception ("Packages could not be fetched from ScanCode.io" )
681681
682682 def save (self ):
683683 self .import_packages ()
Original file line number Diff line number Diff line change @@ -1153,13 +1153,13 @@ def test_product_portfolio_import_packages_from_scio_importer_look_for_existing_
11531153 package = importer .look_for_existing_package (package_data )
11541154 self .assertEqual (package1 , package )
11551155
1156- # 2 packages are matched, cannot defined the one that should be used
1156+ # 2 packages are matched, cannot define the one that should be used
11571157 package1 .update (download_url = download_url )
11581158 package = importer .look_for_existing_package (package_data )
11591159 self .assertIsNone (package )
11601160
11611161 # If the package data does not include a download_url value:
1162- # Attemp to find an existing package using purl-only match.
1162+ # Attempt to find an existing package using purl-only match.
11631163 package2 .delete ()
11641164 package = importer .look_for_existing_package (package_data )
11651165 self .assertEqual (package1 , package )
You can’t perform that action at this time.
0 commit comments