Supression des doubles #fait
This commit is contained in:
@@ -102,6 +102,9 @@ class cls_caldav():
|
||||
item.desc = event["DESCRIPTION"]
|
||||
if "#" in item.desc:
|
||||
item.done = True
|
||||
if "#Fait" in item.desc:
|
||||
item.desc = item.desc.replace("#Fait", "")
|
||||
|
||||
if '{href=' in item.desc:
|
||||
temp_str = item.desc.split('{href=')[1]
|
||||
temp_str = temp_str.split('}')[0]
|
||||
@@ -171,6 +174,9 @@ class cls_caldav_client():
|
||||
event = self.get_event_by_uuid(calandar=calandar,uuid=uuid)
|
||||
if "#Fait" not in event.vobject_instance.vevent.description.value:
|
||||
event.vobject_instance.vevent.description.value = event.vobject_instance.vevent.description.value + " #Fait"
|
||||
else:
|
||||
while "#Fait#Fait" in event.vobject_instance.vevent.description.value:
|
||||
event.vobject_instance.vevent.description.value = event.vobject_instance.vevent.description.value.replace("#Fait#Fait","#Fait")
|
||||
|
||||
event.save()
|
||||
|
||||
|
Reference in New Issue
Block a user