Skip to content

Commit 4ad725e

Browse files
committed
throw in shit fix to ensure right projects load
1 parent b9522fe commit 4ad725e

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

app/dashboard/router.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,15 @@ def get_queryset(self):
263263
bounty__bounty_owner_github_username=sponsor)).exclude(
264264
status='invalid').prefetch_related('profiles', 'bounty').order_by('-winner', order_by, 'id')
265265

266+
projects = []
267+
for project in queryset:
268+
bounty = project.bounty
269+
org_name = bounty.org_name
270+
if org_name != sponsor:
271+
projects.append(project.pk)
272+
273+
queryset = queryset.exclude(pk__in=projects)
274+
266275
if q:
267276
queryset = queryset.filter(
268277
Q(name__icontains=q) |

app/grants/management/commands/ingest_grant_txns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020

2121
import datetime
2222
import os
23-
import pytz
2423

2524
from django.conf import settings
2625
from django.core.management.base import BaseCommand
2726

27+
import pytz
2828
import requests
2929
from dashboard.models import Activity, Profile
30-
from economy.tx import headers
3130
from economy.models import Token
31+
from economy.tx import headers
3232
from economy.utils import convert_token_to_usdt
3333
from grants.models import Contribution, Grant, Subscription
3434
from web3 import Web3

app/grants/urls.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

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

3131
app_name = 'grants'

0 commit comments

Comments
 (0)