Unverified Commit d8b8f55a authored by
Correct and extend models and defaults
repo_management/defaults.py: Add the IntEnum `RepoDbType` to be able to identify/address the different types of binary database files (e.g. .db vs. .files). Change the %LICENSE% entry in `DESC_JSON` to not track the name in plural (use "license" instead of "licenses") to stay in line with the naming of the original variable. repo_management/models.py: Change the `License` model to track an optional list of license identifiers using the singular term ("license" instead of "licenses") to have more predictable and coherent naming of variables and attributes. Add `Base` to `OutputPackageBase` as this way the model is more complete and it becomes much easier to use it, without having to also pass the pkgbase alongside it. Add the convenience method `get_packages_as_models()` to `OutputPackageBase` which returns the list of packages as tuples of `PackageDesc` and `Files`.
Showing with 63 additions and 3 deletions