Add check_table_name function
This commit is contained in:
1 parent
ae509537ed
commit
0e710f09c5
1 file changed
+8
@@ -8,6 +8,14 @@ from datetime import datetime, timedelta
|
||||
from data.database import PowerballDraw, MegaMillionsDraw
|
||||
|
||||
|
||||
def check_table_name(table_name: str) -> bool:
|
||||
"""
|
||||
:param table_name: table name
|
||||
:return: True if table name is valid
|
||||
"""
|
||||
return table_name in ['PowerballDraw', 'MegaMillionsDraw']
|
||||
|
||||
|
||||
def get_next_draw_date(game: str | None, from_date: str | None = None) -> str | None:
|
||||
"""
|
||||
Gets the next drawing date from the current or specified date for the given game
|
||||
|
||||
Reference in new issue
Block a user