Skip to content

Commit

Permalink
Add changelog entry and fix unit tests #12
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <tdruez@nexb.com>
  • Loading branch information
tdruez committed May 27, 2024
1 parent 155c684 commit 0633cad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ Release notes
- Enhance Package Import to support modifications.
https://github.com/nexB/dejacode/issues/84

- Add an option on the "Add to Product" form to to replace any existing relationships
with a different version of the same object by the selected object.
https://github.com/nexB/dejacode/issues/12

### Version 5.0.1

- Improve the stability of the "Check for new Package versions" feature.
Expand Down
4 changes: 1 addition & 3 deletions component_catalog/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,9 +946,7 @@ def form_valid(self, form):
model_name = self.model._meta.model_name
product_name = form.cleaned_data["product"].name

msg = ""
if created_count:
msg = f"{created_count} {model_name}(s) added to {product_name}."
msg = f"{created_count} {model_name}(s) added to {product_name}."
if updated_count:
msg += f" {updated_count} {model_name}(s) updated on {product_name}."
if unchanged_count:
Expand Down

0 comments on commit 0633cad

Please sign in to comment.