Bug fixes and improved handling of event editor.

This commit is contained in:
2019-10-18 22:00:52 +02:00
parent 56477948fc
commit 79d1bbbc46
12 changed files with 183 additions and 44 deletions

View File

@@ -1,4 +1,4 @@
from estusshots.orm import new_session, EventType, Season, Player, Drink, Enemy
from estusshots.orm import new_session, EventType, Season, Player, Drink, Enemy, Episode
def event_choices():
@@ -26,6 +26,13 @@ def player_choice():
return [(p.id, p.name) for p in players]
def player_choice_for_episode(episode: Episode):
"""
Create a list of ids and names for players of this episode
"""
return [(p.id, p.name) for p in episode.players]
def drink_choice():
"""
Query database for a list of all available drinks to select from