Skip to content
Snippets Groups Projects
Commit 71c5192b authored by Panos Christeas's avatar Panos Christeas
Browse files

caldav: don't bork if client requests foobar.ics

bzr revid: p_christ@hol.gr-20100812111018-tzpw0yixyuwp4dg0
parent 05cdd750
Branches
Tags
No related merge requests found
......@@ -86,11 +86,11 @@ class node_calendar_collection(nodes.node_dir):
res.append(node_calendar(cal.name, self, self.context, cal))
if (not name) or ext:
res.append(res_node_calendar(cal.name+'.ics', self, self.context, cal))
# May be both of them!
# May be both of them!
return res
def _get_dav_owner(self, cr):
# Todo?
# Todo?
return False
def _get_ttag(self, cr):
......@@ -206,7 +206,15 @@ class node_calendar(nodes.node_class):
if name:
if name.endswith('.ics'):
name = name[:-4]
where.append(('id','=',int(name)))
try:
where.append(('id','=',int(name)))
except ValueError:
# if somebody requests any other name than the ones we
# generate (non-numeric), it just won't exist
# FIXME: however, this confuses Evolution (at least), which
# thinks the .ics node hadn't been saved.
return []
if not domain:
domain = []
#for opr1, opt, opr2 in domain:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment