Compare commits

..

6 Commits
main ... 1.2.3

Author SHA1 Message Date
Marc Koch 85d0f940e5
🔖 Version 1.2.3 2025-07-16 15:01:06 +02:00
Marc Koch 66cb2f01f8
🩹 round event end time to nearest minute
Ensures that the event end time is rounded down to the nearest minute.

This prevents potential collision issues where events start and end at
very close times (seconds/milliseconds), especially when creating new events.
2025-07-16 15:00:30 +02:00
Marc Koch 9bfb8c28f6
🔖 Version 1.2.2 2025-07-15 13:04:01 +02:00
Marc Koch f7755cd61d
🐛 fix: cannot decline invitation for shared calendar
If the principal of the calendar does not own it, because it is a shared calendar, invitations cannot be declined because the principal is not invited. This fix causes the appointment to be canceled in the calendar instead.
2025-07-15 13:03:42 +02:00
Marc Koch ef60524866
🔖 Version 1.2.1 2025-07-15 12:50:11 +02:00
Marc Koch ee4ff38f13
🐛 fix: remove hardcoded mailserver
Oops 🤦‍♂️
2025-07-15 11:03:11 +02:00
3 changed files with 5 additions and 3 deletions

View File

@ -176,6 +176,9 @@ class Event(models.Model):
self.created = datetime.now(tz=timezone.get_current_timezone()) self.created = datetime.now(tz=timezone.get_current_timezone())
self.ics = self.create_ics() self.ics = self.create_ics()
# Round down to the nearest minute to avoid collisions between events
self.end = self.end.replace(second=0, microsecond=0)
# Send the event to the CalDAV server if it has not been cancelled yet # Send the event to the CalDAV server if it has not been cancelled yet
if not self.cancelled: if not self.cancelled:
try: try:

View File

@ -189,7 +189,6 @@ def clear(target_calendars: list, is_test: bool=False) -> dict:
# we need to cancel it now # we need to cancel it now
elif not event.is_cancelled: elif not event.is_cancelled:
if not is_test: if not is_test:
event.obj.decline_invite()
event.obj.icalendar_component["status"] = "CANCELLED" event.obj.icalendar_component["status"] = "CANCELLED"
event.obj.save() event.obj.save()
is_cancelled = True is_cancelled = True
@ -459,7 +458,7 @@ def send_mail_to_organizer(
else: else:
print("Using SSL for SMTP connection.") print("Using SSL for SMTP connection.")
if not is_test: if not is_test:
with smtplib.SMTP_SSL("mail.extrasolar.space", with smtplib.SMTP_SSL(os.getenv('SMTP_SERVER'),
os.getenv('SMTP_PORT', 465), os.getenv('SMTP_PORT', 465),
context=ssl_context) as server: context=ssl_context) as server:
server.login(os.getenv("SMTP_USER_NAME", os.getenv("SMTP_EMAIL")), os.getenv("SMTP_PASSWORD")) server.login(os.getenv("SMTP_USER_NAME", os.getenv("SMTP_EMAIL")), os.getenv("SMTP_PASSWORD"))

View File

@ -1 +1 @@
1.2.0 1.2.3