Skip to content

Commit

Permalink
Follow black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bchardin authored and tobixen committed Nov 7, 2023
1 parent 34bd9f7 commit 12fb234
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions caldav/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ def _query(
) or ret.status >= 400:
## COMPATIBILITY HACK - see https://github.com/python-caldav/caldav/issues/309
body = to_wire(body)
if ret.status == 500 and not b"getetag" in body and b"<C:calendar-data/>" in body:
if (
ret.status == 500
and not b"getetag" in body
and b"<C:calendar-data/>" in body
):
body = body.replace(
b"<C:calendar-data/>", b"<D:getetag/><C:calendar-data/>"
)
Expand Down Expand Up @@ -1064,7 +1068,6 @@ def search(
):
objects.append(item)
else:

if not xml:
(xml, comp_class) = self.build_search_xml_query(
comp_class=comp_class, todo=todo, props=props, **kwargs
Expand Down

0 comments on commit 12fb234

Please sign in to comment.