forked from enviPath/enviPy
[Enhancement] Refactor of license django model (#187)
Fixes #119 Licenses are now created in the bootstrap management command. To only create the licenses use the command line argument `-ol` or `--only-licenses`. These licenses are then fetched by there `cc_string` when adding a license to a package. Co-authored-by: Liam Brydon <62733830+MyCreativityOutlet@users.noreply.github.com> Co-authored-by: jebus <lorsbach@envipath.com> Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#187 Co-authored-by: liambrydon <lbry121@aucklanduni.ac.nz> Co-committed-by: liambrydon <lbry121@aucklanduni.ac.nz>
This commit is contained in:
@ -714,6 +714,7 @@ class PackageImporter:
|
||||
license_obj, _ = License.objects.get_or_create(
|
||||
name=license_data["name"],
|
||||
defaults={
|
||||
"cc_string": license_data.get("cc_string", ""),
|
||||
"link": license_data.get("link", ""),
|
||||
"image_link": license_data.get("image_link", ""),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user