Skip to content

Commit 69587d3

Browse files
authored
Merge pull request #1751 from pbiering/fix-1515
Fix 1515
2 parents 3bdcbbd + f41533c commit 69587d3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

radicale/app/report.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
# Copyright © 2008 Nicolas Kandel
33
# Copyright © 2008 Pascal Halter
44
# Copyright © 2008-2017 Guillaume Ayoub
5-
# Copyright © 2017-2018 Unrud <unrud@outlook.com>
5+
# Copyright © 2017-2021 Unrud <unrud@outlook.com>
6+
# Copyright © 2024-2024 Pieter Hijma <pieterhijma@users.noreply.github.com>
7+
# Copyright © 2024-2024 Ray <ray@react0r.com>
8+
# Copyright © 2024-2024 Georgiy <metallerok@gmail.com>
9+
# Copyright © 2024-2025 Peter Bieringer <pb@bieringer.de>
610
#
711
# This library is free software: you can redistribute it and/or modify
812
# it under the terms of the GNU General Public License as published by
@@ -171,7 +175,11 @@ def xml_report(base_prefix: str, path: str, xml_request: Optional[ET.Element],
171175
xmlutils.make_human_tag(root.tag), path)
172176
return client.FORBIDDEN, xmlutils.webdav_error("D:supported-report")
173177

174-
props: Union[ET.Element, List] = root.find(xmlutils.make_clark("D:prop")) or []
178+
props: Union[ET.Element, List]
179+
if root.find(xmlutils.make_clark("D:prop")) is not None:
180+
props = root.find(xmlutils.make_clark("D:prop")) # type: ignore[assignment]
181+
else:
182+
props = []
175183

176184
hreferences: Iterable[str]
177185
if root.tag in (

0 commit comments

Comments
 (0)