Skip to content

Commit

Permalink
Fix ids in get_or_create
Browse files Browse the repository at this point in the history
  • Loading branch information
adammcmaster committed Apr 12, 2024
1 parent c748c5b commit 239fa48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions starcatalogue/management/commands/create_all_zoo_subjects.py
Expand Up @@ -25,12 +25,12 @@ def handle(self, *args, **options):

star = Star.objects.get_or_create(superwasp_id=superwasp_id)
lightcurve = FoldedLightcurve.objects.get_or_create(
star=star,
star__id=star.id,
period_number=period_number,
)

ZooniverseSubject.objects.get_or_create(
zooniverse_id=subject_id, lightcurve=lightcurve
zooniverse_id=subject_id, lightcurve__id=lightcurve.id
)

imported_total += 1
Expand Down

0 comments on commit 239fa48

Please sign in to comment.