Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple of inline comments for code improvement #2

Merged
merged 1 commit into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions figures/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ class SiteDailyMetrics(TimeStampedModel):
total_user_count = models.IntegerField()
course_count = models.IntegerField()
total_enrollment_count = models.IntegerField()

# Should change this to default value of 0
mau = models.IntegerField(blank=True, null=True)

class Meta:
Expand Down
3 changes: 3 additions & 0 deletions figures/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ def get_courses_for_site(site):


def get_user_ids_for_site(site):
"""
We can use organization_instance.users instead
"""
if figures.helpers.is_multisite():
orgs = organizations.models.Organization.objects.filter(sites__in=[site])
mappings = organizations.models.UserOrganizationMapping.objects.filter(
Expand Down