Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
e7bd0ba7
Commit
e7bd0ba7
authored
May 07, 2020
by
Andreas Valder
Browse files
Merge branch 'patch-1' into 'master'
Fix Issue
#382
See merge request
!32
parents
bf38fa18
2feb1618
Changes
1
Hide whitespace changes
Inline
Side-by-side
importer.py
View file @
e7bd0ba7
...
...
@@ -139,10 +139,11 @@ def fetch_ro_course_events(item):
args
=
urllib
.
parse
.
parse_qs
(
url
.
query
)
if
'pStpSpNr'
in
args
:
# Legacy URLs
id
=
args
[
'pStpSpNr'
][
0
]
elif
url
.
path
.
split
(
'/'
)[
-
2
]
==
'courses'
:
# New URLs
elif
len
(
url
.
path
.
split
(
'/'
))
>
1
and
url
.
path
.
split
(
'/'
)[
-
2
]
==
'courses'
:
# New URLs
id
=
url
.
path
.
split
(
'/'
)[
-
1
]
else
:
flash
(
"Ungültige URL: '"
+
i
[
'url'
]
+
"'"
)
flash
(
"Ungültige URL: '"
+
url
.
geturl
()
+
"'"
)
return
[]
#cant get events from wrong URL so just return empty list
cal
=
icalendar
.
Calendar
().
from_ical
(
fetch_ro_course_ical
(
id
))
events
=
[]
for
comp
in
cal
.
subcomponents
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment