Skip to content

Commit b3fb605

Browse files
AyanSinhaMahapatraalok1304
authored andcommitted
Fix package resource assign bug for jar manifests
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com> Signed-off-by: Alok Kumar <alokkumarjipura9973@gmail.com>
1 parent c4a45eb commit b3fb605

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/packagedcode/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,8 @@ def assign_package_to_resources(cls, package, resource, codebase, package_adder=
12221222
# update `for_packages` of a codebase resource.
12231223
package_uid = package.package_uid
12241224
if resource.path.endswith("-extract"):
1225-
archive_resource = resource.extracted_from(codebase)
1225+
archive_resource_path = resource.path.removesuffix("-extract")
1226+
archive_resource = codebase.get_resource(archive_resource_path)
12261227
if archive_resource:
12271228
package_adder(package_uid, archive_resource, codebase)
12281229

0 commit comments

Comments
 (0)