Skip to content

Commit

Permalink
Updated get_user_projects cache
Browse files Browse the repository at this point in the history
  • Loading branch information
codingforentrepreneurs committed Jan 17, 2024
1 parent fd7d69d commit b767ef9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def get_queryset(self):
def has_access(self, user=None):
return self.get_queryset().has_access(user=user)

def has_access_by_username(self, user=None):
# Added off video recordings
# for the project cache
return self.get_queryset().has_access_by_username(user=user)

class Project(models.Model):
owner = models.ForeignKey(User, null=True, related_name='owned_projects', on_delete=models.SET_NULL)
users = models.ManyToManyField(User, blank=True,
Expand Down

0 comments on commit b767ef9

Please sign in to comment.