def _process_request(self, request, event_key): alliance_selections = JSONAllianceSelectionsParser.parse(request.body) event = Event.get_by_id(event_key) event.alliance_selections_json = json.dumps(alliance_selections) event.dirty = True # TODO: hacky EventManipulator.createOrUpdate(event)
def _process_request(self, request, event_key): alliance_selections = JSONAllianceSelectionsParser.parse(request.body) event = Event.get_by_id(event_key) event.alliance_selections_json = json.dumps(alliance_selections) event.dirty = True # TODO: hacky EventManipulator.createOrUpdate(event) self.response.out.write(json.dumps({'Success': "Alliance selections successfully updated"}))
def _process_request(self, request, event_key): alliance_selections = JSONAllianceSelectionsParser.parse(request.body) event = Event.get_by_id(event_key) event.alliance_selections_json = json.dumps(alliance_selections) EventManipulator.createOrUpdate(event) self.response.out.write( json.dumps({'Success': "Alliance selections successfully updated"}))
def _process_request(self, request, event_key): alliance_selections = JSONAllianceSelectionsParser.parse(request.body) event = Event.get_by_id(event_key) event_details = EventDetails( id=event_key, alliance_selections=alliance_selections ) EventDetailsManipulator.createOrUpdate(event_details) self.response.out.write(json.dumps({'Success': "Alliance selections successfully updated"}))
def _process_request(self, request, event_key): alliance_selections = JSONAllianceSelectionsParser.parse(request.body) event_details = EventDetails( id=event_key, alliance_selections=alliance_selections ) if self.event.remap_teams: EventHelper.remapteams_alliances(event_details.alliance_selections, self.event.remap_teams) EventDetailsManipulator.createOrUpdate(event_details) self.response.out.write(json.dumps({'Success': "Alliance selections successfully updated"}))