Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
ashikzk committed Sep 12, 2024
1 parent 15a3a18 commit 2b52b6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/product_management/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,9 @@ def form_valid(self, form):
form.instance.skill = Skill.objects.get(id=form.cleaned_data.get("skill_id"))
response = super().form_save(form)
if len(form.cleaned_data.get("expertise_ids")) > 0:
form.instance.expertise.add(*Expertise.objects.filter(id__in=form.cleaned_data.get("expertise_ids")))
form.instance.expertise.add(
*Expertise.objects.filter(id__in=form.cleaned_data.get("expertise_ids").split(","))
)
form.instance.save()
return response

Expand Down

0 comments on commit 2b52b6b

Please sign in to comment.