Skip to content

Commit

Permalink
Fix duplicate learn modules created on submitting forms
Browse files Browse the repository at this point in the history
  • Loading branch information
pxwxnvermx committed Oct 3, 2023
1 parent de43f0f commit b02c151
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commcare_connect/opportunity/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def create_learn_modules_assessments(opportunity_id):
for block in connect_blocks:
LearnModule.objects.update_or_create(
app=learn_app,
name=block.name,
slug=block.id,
defaults={
"name": block.name,
"description": block.description,
"time_estimate": block.time_estimate,
},
Expand Down

0 comments on commit b02c151

Please sign in to comment.