Skip to content

Commit

Permalink
throw in shit fix to ensure right projects load
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Oct 7, 2020
1 parent b9522fe commit 4ad725e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
9 changes: 9 additions & 0 deletions app/dashboard/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,15 @@ def get_queryset(self):
bounty__bounty_owner_github_username=sponsor)).exclude(
status='invalid').prefetch_related('profiles', 'bounty').order_by('-winner', order_by, 'id')

projects = []
for project in queryset:
bounty = project.bounty
org_name = bounty.org_name
if org_name != sponsor:
projects.append(project.pk)

queryset = queryset.exclude(pk__in=projects)

if q:
queryset = queryset.filter(
Q(name__icontains=q) |
Expand Down
4 changes: 2 additions & 2 deletions app/grants/management/commands/ingest_grant_txns.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

import datetime
import os
import pytz

from django.conf import settings
from django.core.management.base import BaseCommand

import pytz
import requests
from dashboard.models import Activity, Profile
from economy.tx import headers
from economy.models import Token
from economy.tx import headers
from economy.utils import convert_token_to_usdt
from grants.models import Contribution, Grant, Subscription
from web3 import Web3
Expand Down
10 changes: 5 additions & 5 deletions app/grants/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

from grants.views import (
add_grant_from_collection, bulk_fund, bulk_grants_for_cart, clr_grants, flag, get_collection, get_collections_list,
get_grant_payload, get_grants, get_replaced_tx, grant_activity, grant_categories, grant_details, grant_fund,
grant_new, grant_new_whitelabel, grants, grants_addr_as_json, grants_bulk_add, grants_by_grant_type,
grants_cart_view, grants_clr, grants_stats_view, invoice, leaderboard, new_matching_partner, profile, quickstart,
remove_grant_from_collection, save_collection, subscription_cancel, toggle_grant_favorite, verify_grant,
zksync_get_interrupt_status, zksync_set_interrupt_status, grants_zksync_recovery_view, get_interrupted_contributions
get_grant_payload, get_grants, get_interrupted_contributions, get_replaced_tx, grant_activity, grant_categories,
grant_details, grant_fund, grant_new, grant_new_whitelabel, grants, grants_addr_as_json, grants_bulk_add,
grants_by_grant_type, grants_cart_view, grants_clr, grants_stats_view, grants_zksync_recovery_view, invoice,
leaderboard, new_matching_partner, profile, quickstart, remove_grant_from_collection, save_collection,
subscription_cancel, toggle_grant_favorite, verify_grant, zksync_get_interrupt_status, zksync_set_interrupt_status,
)

app_name = 'grants'
Expand Down

0 comments on commit 4ad725e

Please sign in to comment.