本文整理匯總了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')