Skip to content

Commit

Permalink
Minor tweak in lead programme mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
profcturner committed Jul 13, 2020
1 parent 8173d9c commit fb881e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion loads/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def __clone_module_data(self, source_package, options, messages, mapping_activit
module.package = self

# Correct programme mappings to the new copies, first for the lead_programme, but only if data is there
if module.lead_programme:
if module.lead_programme and module.lead_programme.pk in programme_mapping:
module.lead_programme = Programme.objects.get(pk=programme_mapping[module.lead_programme.pk])
# And now for the slightly more complex many to many programmes
# We need to force a save before Many to Many mappings can be corrected.
Expand Down

0 comments on commit fb881e7

Please sign in to comment.