parse events containing 2 levels of location data
This commit is contained in:
parent
422d588d53
commit
8a8c415015
|
@ -38,7 +38,13 @@ def import_calendar(calendar):
|
||||||
if location:
|
if location:
|
||||||
room = location
|
room = location
|
||||||
try:
|
try:
|
||||||
required_helpers = int(summary)
|
try:
|
||||||
|
# new edge case: location is defined, but summary contains an addition to the location and a count
|
||||||
|
room2, required_helpers = tuple(summary.rsplit(maxsplit=1))
|
||||||
|
required_helpers = int(required_helpers)
|
||||||
|
room = f"{room} ({room2})"
|
||||||
|
except ValueError:
|
||||||
|
required_helpers = int(summary)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
required_helpers = 0
|
required_helpers = 0
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue