diff --git a/app/app/db.py b/app/app/db.py index 80c2e52c5ad..fe2f709751c 100644 --- a/app/app/db.py +++ b/app/app/db.py @@ -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): """ diff --git a/app/assets/v2/js/grants/ingest-missing-contributions.js b/app/assets/v2/js/grants/ingest-missing-contributions.js index f89fae0c2b3..9fc614b309f 100644 --- a/app/assets/v2/js/grants/ingest-missing-contributions.js +++ b/app/assets/v2/js/grants/ingest-missing-contributions.js @@ -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'); } @@ -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'); } } diff --git a/app/grants/models.py b/app/grants/models.py index 2ad74d530e7..80c8fbd5b79 100644 --- a/app/grants/models.py +++ b/app/grants/models.py @@ -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: diff --git a/app/marketing/tasks.py b/app/marketing/tasks.py index dfce0fd93a8..28df7da5c69 100644 --- a/app/marketing/tasks.py +++ b/app/marketing/tasks.py @@ -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: