Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
octavioamu committed Mar 24, 2021
2 parents bf11b15 + fb7eca3 commit 5de8993
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/app/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def allow_relation(self, obj1, obj2, **hints):
db_set = {'default', 'read_replica_1'}
if obj1._state.db in db_set and obj2._state.db in db_set:
return True
return None
return True # TODO: be more stringent about this IFF we ever have a situation in which diff tables are on diff DBs

def allow_migrate(self, db, app_label, model_name=None, **hints):
"""
Expand Down
6 changes: 3 additions & 3 deletions app/assets/v2/js/grants/ingest-missing-contributions.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ Vue.component('grants-ingest-contributions', {
throw new Error('Please connect a wallet');
}

// Parse out provided form inputs
// Parse out provided form inputs and verify them, but bypass address checks if user is staff
({ txHash, userAddress } = formParams);

// If user entered an address, verify that it matches the user's connected wallet address
if (userAddress && ethers.utils.getAddress(userAddress) !== ethers.utils.getAddress(walletAddress)) {
if (!document.contxt.is_staff && userAddress && ethers.utils.getAddress(userAddress) !== ethers.utils.getAddress(walletAddress)) {
throw new Error('Provided wallet address does not match connected wallet address');
}

Expand All @@ -145,7 +145,7 @@ Vue.component('grants-ingest-contributions', {
if (!receipt) {
throw new Error('Transaction hash not found. Are you sure this transaction was confirmed?');
}
if (ethers.utils.getAddress(receipt.from) !== ethers.utils.getAddress(walletAddress)) {
if (!document.contxt.is_staff && ethers.utils.getAddress(receipt.from) !== ethers.utils.getAddress(walletAddress)) {
throw new Error('Sender of the provided transaction does not match connected wallet address. Please contact Gitcoin and we can ingest your contributions for you');
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/grants/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def calc_clr_round(self):
# create_grant_active_clr_mapping
clr_rounds = GrantCLR.objects.all()
for this_clr_round in clr_rounds:
add_to_round = self.active and not self.hidden and this_clr_round.is_active and this_clr_round.happening_now and self in this_clr_round.grants.all()
add_to_round = self.active and not self.hidden and this_clr_round.is_active and this_clr_round.happening_now and self.pk in this_clr_round.grants.all().values_list('pk', flat=True)
if add_to_round:
self.in_active_clrs.add(this_clr_round)
else:
Expand Down
2 changes: 1 addition & 1 deletion app/marketing/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

redis = RedisService().redis

rate_limit = '30000/s' if settings.FLUSH_QUEUE or settings.MARKETING_FLUSH_QUEUE else '7/m'
rate_limit = '30000/s' if settings.FLUSH_QUEUE or settings.MARKETING_FLUSH_QUEUE else '25/m'

@app.shared_task(bind=True, rate_limit=rate_limit)
def new_bounty_daily(self, email_subscriber_id, retry: bool = True) -> None:
Expand Down

0 comments on commit 5de8993

Please sign in to comment.