diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-10-16 22:16:23 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-10-16 23:28:34 +0200 |
commit | 2601ffd19e9622e98792ce2b199717c387674283 (patch) | |
tree | 83b8b70c84c7712c46eb526b20c31f4fea73b8bb /module/vcomponent | |
parent | Add missing lambda in make routes. (diff) | |
download | calp-2601ffd19e9622e98792ce2b199717c387674283.tar.gz calp-2601ffd19e9622e98792ce2b199717c387674283.tar.xz |
Fix errors when submitting events.
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/util/instance/methods.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/vcomponent/util/instance/methods.scm b/module/vcomponent/util/instance/methods.scm index f6c56cb9..28b664c6 100644 --- a/module/vcomponent/util/instance/methods.scm +++ b/module/vcomponent/util/instance/methods.scm @@ -177,10 +177,11 @@ (cond [(get-event-by-uid this (prop event 'UID)) => (lambda (old-event) + (define old-calendar (parent old-event)) ;; remove old instance of event from runtime (remove-event this old-event) - (remove-child! (parent old-event) old-event) + (remove-child! old-calendar old-event) ;; Add new event to runtime, ;; MUST be done after since the two events SHOULD share UID. @@ -198,8 +199,8 @@ (unless ((@ (vcomponent formats vdir save-delete) save-event) event) (throw 'misc-error (G_ "Saving event to disk failed."))) - - (unless (eq? calendar (parent old-event)) + #; + (unless (eq? calendar old-calendar) ;; change to a new calendar (format (current-error-port) (G_ "Unlinking old event from ~a~%") |