Skip to content

Commit

Permalink
One-liner update to DRY up default site handling
Browse files Browse the repository at this point in the history
figures.sites.default_site() is returning the Site object matching
`settings.SITE_ID` if we are running in single site mode and that is
exactly what is called in single site mode for
`get_site_for_course(course_id)`, so just making it that the source of
truth is the same code
  • Loading branch information
johnbaldwin committed Feb 17, 2022
1 parent 926cd7c commit 83687ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion figures/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def get_site_for_course(course_id):
site = None
else:
# Operating in single site / standalone mode, return the default site
site = Site.objects.get(id=settings.SITE_ID)
site = default_site()
return site


Expand Down

0 comments on commit 83687ca

Please sign in to comment.