diff --git a/CHANGELOG.md b/CHANGELOG.md
index 857434e80..64bae9a67 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
- Run the docker image with the system user
- During the setup, autoconfigure the main domain
- During the setup, ask to set ALLOW_INSECURE_HTTP if DEFAULT_PROTOCOL was set to http
+- Fix a bug: unable to edit an event
- Fix a bug: unable to generate the secret key base during the setup
- Fix a bug: error message during the setup: the input device is not a TTY
- Fix a bug: when Fab-manager was installed as non-root user, unable to compile the assets during the upgrade
diff --git a/app/frontend/templates/events/_form.html b/app/frontend/templates/events/_form.html
index f6e7e2ac2..bbbc8b682 100644
--- a/app/frontend/templates/events/_form.html
+++ b/app/frontend/templates/events/_form.html
@@ -138,10 +138,10 @@
@@ -180,7 +180,7 @@
-
+
diff --git a/app/models/event.rb b/app/models/event.rb
index 2e5a251c2..c0a31bd7b 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -84,6 +84,10 @@ class Event < ApplicationRecord
end
end
+ def all_day?
+ availability.start_at.hour.zero?
+ end
+
private
def event_recurrence
diff --git a/app/views/api/events/_event.json.jbuilder b/app/views/api/events/_event.json.jbuilder
index c5813e1ec..c94072877 100644
--- a/app/views/api/events/_event.json.jbuilder
+++ b/app/views/api/events/_event.json.jbuilder
@@ -32,7 +32,7 @@ json.end_time event.availability.end_at
json.month t('date.month_names')[event.availability.start_at.month]
json.month_id event.availability.start_at.month
json.year event.availability.start_at.year
-json.all_day event.availability.start_at.hour.zero?
+json.all_day event.all_day?
json.availability do
json.id event.availability.id
json.start_at event.availability.start_at