Supression des doubles #fait

This commit is contained in:
Ambulance Clerc
2022-11-26 13:05:08 +01:00
parent 9364e08354
commit 57767bb34c
2 changed files with 7 additions and 1 deletions

View File

@@ -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()

View File

@@ -78,10 +78,10 @@
display: flex;
height: 115px;
align-content: flex-start;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 135px;
overflow: auto;
}
.main_div{
height: 440px;