Commit 4f39ec35 by Renzo Lucioni

Update outdated slugs for existing products

Our previous method of slug generation did not account for ID verification. This change allows us to correct the structure of existing slugs during migration.
parent 9f6a955f
...@@ -139,6 +139,8 @@ class Course(models.Model): ...@@ -139,6 +139,8 @@ class Course(models.Model):
try: try:
seat = Product.objects.get(slug__in=slugs) seat = Product.objects.get(slug__in=slugs)
seat.slug = slug
logger.info( logger.info(
'Retrieved course seat child product with certificate type [%s] for [%s] from database.', 'Retrieved course seat child product with certificate type [%s] for [%s] from database.',
certificate_type, certificate_type,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment