about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-10-28 19:41:11 +0200
committerClaire <claire.github-309c@sitedethib.com>2022-10-28 19:49:42 +0200
commitb514998dc1a75609e29651e965b681f31405ffc2 (patch)
treef0daf77542f7e652e86f5e02741338a5026d6341 /app/models
parent592147b9021c5ee5aebed4e3355bafd82c393533 (diff)
parent5fa340931e2bd39a4bcccc9a97ad58e13a2d56ab (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models')
-rw-r--r--app/models/announcement.rb5
1 files changed, 0 insertions, 5 deletions
diff --git a/app/models/announcement.rb b/app/models/announcement.rb
index bedced9de..4b2cb4c6d 100644
--- a/app/models/announcement.rb
+++ b/app/models/announcement.rb
@@ -31,7 +31,6 @@ class Announcement < ApplicationRecord
   validates :starts_at, presence: true, if: -> { ends_at.present? }
   validates :ends_at, presence: true, if: -> { starts_at.present? }
 
-  before_validation :set_all_day
   before_validation :set_published, on: :create
 
   def to_log_human_identifier
@@ -89,10 +88,6 @@ class Announcement < ApplicationRecord
 
   private
 
-  def set_all_day
-    self.all_day = false if starts_at.blank? || ends_at.blank?
-  end
-
   def set_published
     return unless scheduled_at.blank? || scheduled_at.past?