Skip to content

Commit

Permalink
Add new license fields in the ComponentAdmin #63
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Jun 10, 2024
1 parent f851058 commit 0b194be
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion component_catalog/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ class ComponentAdmin(
"copyright",
"holder",
"license_expression",
"declared_license_expression",
"declared_license_expression_spdx",
"license_detections",
"other_license_expression",
"other_license_expression_spdx",
"other_license_detections",
"extracted_license_statement",
"reference_notes",
"release_date",
"description",
Expand Down Expand Up @@ -418,7 +425,12 @@ class ComponentAdmin(
autocomplete_lookup_fields = {"fk": ["owner"]}
# We have to use 'completion_level' rather than the 'completion_level_pct'
# callable to keep the help_text available during render in the template.
readonly_fields = DataspacedAdmin.readonly_fields + ("urn_link", "completion_level")
readonly_fields = DataspacedAdmin.readonly_fields + (
"urn_link",
"completion_level",
"declared_license_expression_spdx",
"other_license_expression_spdx",
)
form = ComponentAdminForm
inlines = [
SubcomponentChildInline,
Expand Down

0 comments on commit 0b194be

Please sign in to comment.