Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/packagedcode/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,11 @@ def assemble(cls, package_data, resource, codebase):
continue

for pkgdt in res.package_data:
pkgdt = models.PackageData.from_dict(pkgdt)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this could be done directly in package.update where we could accept package_data as a mapping or as an object and convert to object if needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I've updated Package.update() to convert the package data to a PackageData object if the incoming package data is in a dictionary.

package.update(
package_data=pkgdt,
datafile_path=res.path,
)
)

res.for_packages.append(package_uid)
res.save(codebase)
Expand Down Expand Up @@ -545,7 +546,7 @@ def parse_debian_files_list(location, datasource_id, package_type):

ref = models.FileReference(path=path, md5=md5sum)
file_references.append(ref)

if not file_references:
return

Expand Down