FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix options for time · robquant/python-webuntis@e980754 · GitHub

Commit e980754

Browse files
committed
fix options for time
1 parent 5140055 commit e980754

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎webuntis/session.py‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ def timetable(self, start, end, **type_and_id):
219219

220220
parameters = self._create_date_param(end, start,
221221
id=int(element_id), type=element_type_table[element_type])
222-
parameters = parameters["options"] # getTimetable is without options!
223222
return objects.PeriodList, 'getTimetable', parameters
224223

225224
@result_wrapper
@@ -347,7 +346,7 @@ def timetable_with_absences(self, start, end):
347346
:rtype: :py:class:`webuntis.objects.AbsencesList`
348347
"""
349348

350-
parameters = self._create_date_param(end, start)
349+
parameters = { u'options': self._create_date_param(end, start) }
351350

352351
return objects.AbsencesList, 'getTimetableWithAbsences', parameters
353352

@@ -357,12 +356,10 @@ def _create_date_param(end, start, **kwargs):
357356
json_end = utils.datetime_utils.format_date(end)
358357
if json_start > json_end:
359358
raise ValueError('Start can\'t be later than the end.')
360-
parameters = {
361-
"options": dict({
359+
parameters = dict({
362360
'startDate': json_start,
363361
'endDate': json_end,
364362
}, **kwargs)
365-
}
366363
return parameters
367364

368365

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL