Skip to content

Commit

Permalink
Improve syncing on PSF ads to not break with 2 with same name
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Aug 14, 2024
1 parent 7524e1e commit ed32c66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adserver/importers/psf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ def run_import(sync=False, images=False):
if sync:
log.debug(f"Syncing: {name}")
ad, created = Advertisement.objects.get_or_create(
name=name,
slug=slugify(name),
flight=flight,
)
if created:
log.info(f"NEW SPONSOR: Created new sponsor {ad}")

# Update things that might change
ad.name = name
ad.image = image
ad.text = item["description"]
ad.link = item["sponsor_url"]
Expand Down

0 comments on commit ed32c66

Please sign in to comment.