code: def get_project(username, project, machine_name=None):
      
  
      try:
          account = Account.objects.get(
              username=username,
              date_deleted__isnull=True)
      except Account.DoesNotExist:
          return "Account '%s' not found" % username
  
      if project is None:
          project = account.default_project
      else:
          try:
              project = Project.objects.get(pid=project)
          except Project.DoesNotExist:
              project = account.default_project
  
      if project is None:
          return "None"
  
      if account.person not in project.group.members.all():
          project = account.default_project
  
      if project is None:
          return "None"
  
      if account.person not in project.group.members.all():
          return "None"
  
      return project.pid
docs: Used in the submit filter to make sure user is in project