Browse Source

fix misindented early return

The wrong indentation could cause the mail hook to bail early without
any logging when the end time of the event being added/modified happened
later than the current boundary being checked (1 full minute before the
current time).

For example, this caused emails not to be sent in the following setup:
Etar + DAVx⁵ on Android.
Samuel Tardieu 1 month ago
parent
commit
8ace7878a1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      radicale/hook/email/__init__.py

+ 1 - 1
radicale/hook/email/__init__.py

@@ -988,7 +988,7 @@ class Hook(BaseHook):
                 if event_end < (now - timedelta(minutes=1)):
                     logger.warning("Event end time is in the past, skipping notification for event: %s",
                                    email_event_event.uid)
-                return
+                    return
 
             if not previous_item_str:
                 # Dealing with a completely new event, no previous content to compare against.