diff --git a/app/assets/v2/js/pages/dashboard.js b/app/assets/v2/js/pages/dashboard.js index 604ae09569e..c76ed70d01d 100644 --- a/app/assets/v2/js/pages/dashboard.js +++ b/app/assets/v2/js/pages/dashboard.js @@ -531,7 +531,9 @@ var refreshBounties = function(event, offset, append) { explorer.bounties_request = $.get(bountiesURI, function(results, x) { // Filter results by open bounties created more than 3 days ago - if ($('input[name="bounty_filter"]:checked').val().toString() === 'stale') { + const filter_checked = $('input[name="bounty_filter"]:checked').val(); + + if (filter_checked && filter_checked.toString() === 'stale') { results = results.filter(bounty => { const now = new Date(); const created = new Date(bounty.web3_created); diff --git a/app/grants/management/commands/subminer.py b/app/grants/management/commands/subminer.py index e126474034c..c2d9f401596 100644 --- a/app/grants/management/commands/subminer.py +++ b/app/grants/management/commands/subminer.py @@ -160,7 +160,7 @@ def handle(self, *args, **options): num_tx_processed__lt=F('num_tx_approved') ) - is_clr_active = active_clr_rounds.filter(grant_type=grant.grant_type) + is_clr_active = active_clr_rounds.filter(grant_type=grant.grant_type__name) if not is_clr_active: subs = subs.exclude(frequency_unit='roundup') #dont process grant subscriptions until next round diff --git a/app/marketing/management/commands/hypercharge_mode.py b/app/marketing/management/commands/hypercharge_mode.py index 0e3b9d33f62..251d310f8c6 100644 --- a/app/marketing/management/commands/hypercharge_mode.py +++ b/app/marketing/management/commands/hypercharge_mode.py @@ -67,12 +67,13 @@ def handle(self, *args, **options): bounties = bounties.exclude(bounty_state__in=['done', 'cancelled']) bounties = bounties.order_by('metadata__hyper_tweet_counter') - bounty = bounties.first() - offer_title = f'Work on "{bounty.title}" and receive {floatformat(bounty.value_true)} {bounty.token_name}' - offer_desc = '' + if bounties: + bounty = bounties.first() + + offer_title = f'Work on "{bounty.title}" and receive {floatformat(bounty.value_true)} {bounty.token_name}' + offer_desc = '' - if bounty: event_name = '' counter = bounty.metadata['hyper_tweet_counter'] if counter == 0: diff --git a/app/townsquare/management/commands/create_rankings.py b/app/townsquare/management/commands/create_rankings.py index b53b9b0a436..5816b16806e 100644 --- a/app/townsquare/management/commands/create_rankings.py +++ b/app/townsquare/management/commands/create_rankings.py @@ -28,4 +28,5 @@ class Command(BaseCommand): def handle(self, *args, **options): mr = MatchRound.objects.current().first() - mr.process() + if mr: + mr.process()