Skip to content

Commit

Permalink
Sol play query argument verification (#1468)
Browse files Browse the repository at this point in the history
* Ensure sol_tx_signature argument is provided, preventing incorrect results from being returned - observed during staging rollout when queried with tx=... instead of tx_sig=....
  • Loading branch information
hareeshnagaraj committed May 6, 2021
1 parent d1efcbd commit 0ef4573
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions discovery-provider/src/queries/get_sol_plays.py
@@ -1,5 +1,6 @@
import logging
from sqlalchemy import desc, func
from src import exceptions
from src.models import Play
from src.utils import helpers
from src.utils.db_session import get_db_read_replica
Expand All @@ -9,6 +10,9 @@

# Get single play from table
def get_sol_play(sol_tx_signature):
if not sol_tx_signature:
raise exceptions.ArgumentError("Missing tx signature")

db = get_db_read_replica()
sol_play = None
with db.scoped_session() as session:
Expand Down

0 comments on commit 0ef4573

Please sign in to comment.