Returns a list of potential map names with the given tag.
(conn, tag=None)
| 62 | |
| 63 | |
| 64 | def get_tournament_maps(conn, tag=None) -> List[Map]: |
| 65 | """ |
| 66 | Returns a list of potential map names with the given tag. |
| 67 | """ |
| 68 | cur = conn.cursor() |
| 69 | |
| 70 | if tag is not None: |
| 71 | filter_query = 'WHERE tag=\'{}\''.format(tag) |
| 72 | else: |
| 73 | filter_query = '' |
| 74 | |
| 75 | query = 'SELECT name FROM scrimmage_maps {} ORDER BY id;'.format(filter_query) |
| 76 | cur.execute(query) |
| 77 | maps = cur.fetchall() |
| 78 | cur.close() |
| 79 | |
| 80 | return list(map(lambda x: x[0], maps)) |
| 81 | |
| 82 | |
| 83 | def get_all_teams_and_index_submissions(conn) -> List[Team]: |