Skip to content

Commit e5783ce

Browse files
committed
delete obsolete database.vote_type_list function
1 parent 3b9fb2d commit e5783ce

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

src/electiondata/database/__init__.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -921,32 +921,6 @@ def add_records_to_selection_table(engine: sqlalchemy.engine, n: int) -> List[in
921921
return id_list
922922

923923

924-
def vote_type_list(
925-
cursor: psycopg2.extensions.cursor,
926-
datafile_list: List[pd.DataFrame],
927-
by: str = "Id",
928-
) -> (List[str], str):
929-
if len(datafile_list) == 0:
930-
return list(), "No vote types found because no datafiles listed"
931-
932-
q = sql.SQL(
933-
"""
934-
SELECT distinct VC."CountItemType"
935-
FROM "VoteCount" VC
936-
LEFT JOIN _datafile d on VC."_datafile_Id" = d."Id"
937-
WHERE d.{by} in %s
938-
"""
939-
).format(by=sql.Identifier(by))
940-
try:
941-
cursor.execute(q, [tuple(datafile_list)])
942-
vt_list = [x for (x,) in cursor.fetchall()]
943-
err_str = None
944-
except Exception as exc:
945-
err_str = f"Database error pulling list of vote types: {exc}"
946-
vt_list = None
947-
return vt_list, err_str
948-
949-
950924
def jurisdiction_id_list(session: Session) -> List[int]:
951925
"""
952926
Required inputs:

0 commit comments

Comments
 (0)