How to use the ramp-engine.rampbkd.model.Team.query.filter_by function in ramp-engine

To help you get started, we’ve selected a few ramp-engine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paris-saclay-cds / ramp-board / ramp-engine / rampbkd / model.py View on Github external
def get_user_teams(user):
    # This works only if no team mergers. The commented code below
    # is general but slow.
    team = Team.query.filter_by(name=user.name).one()
    yield team
    # teams = Team.query.all()
github paris-saclay-cds / ramp-board / ramp-engine / rampbkd / model.py View on Github external
def get_user_event_teams(event_name, user_name):
    # This works only if no team mergers. The commented code below
    # is general but slow.
    event = Event.query.filter_by(name=event_name).one()
    team = Team.query.filter_by(name=user_name).one()
    event_team = EventTeam.query.filter_by(
        event=event, team=team).one_or_none()
    if event_team is not None:
        yield event_team
    # event = Event.query.filter_by(name=event_name).one()