本文整理汇总了Python中indico.modules.rb.controllers.user.reservations.RHRoomBookingNewBooking._checkParams方法的典型用法代码示例。如果您正苦于以下问题:Python RHRoomBookingNewBooking._checkParams方法的具体用法?Python RHRoomBookingNewBooking._checkParams怎么用?Python RHRoomBookingNewBooking._checkParams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类indico.modules.rb.controllers.user.reservations.RHRoomBookingNewBooking
的用法示例。
在下文中一共展示了RHRoomBookingNewBooking._checkParams方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _checkParams
# 需要导入模块: from indico.modules.rb.controllers.user.reservations import RHRoomBookingNewBooking [as 别名]
# 或者: from indico.modules.rb.controllers.user.reservations.RHRoomBookingNewBooking import _checkParams [as 别名]
def _checkParams(self, params):
RHRoomBookingEventBase._checkParams(self, params)
RHRoomBookingNewBooking._checkParams(self)
assign = request.args.get('assign')
if not assign or assign == 'nothing':
self._assign_to = None
elif assign == 'event':
self._assign_to = self.event
else:
element, _, element_id = assign.partition('-')
if element == 'session':
self._assign_to = self.event.getSessionById(element_id)
elif element == 'contribution':
self._assign_to = self.event.getContributionById(element_id)
else:
raise NoReportError('Invalid assignment')
if not self._assign_to:
raise NoReportError('Invalid assignment')