Compare commits

..

No commits in common. "1.2.3" and "main" have entirely different histories.
1.2.3 ... main

3 changed files with 3 additions and 5 deletions

View File

@ -176,9 +176,6 @@ 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,6 +189,7 @@ 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
@ -458,7 +459,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(os.getenv('SMTP_SERVER'), with smtplib.SMTP_SSL("mail.extrasolar.space",
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.3 1.2.0