about summary refs log tree commit diff
path: root/app/models/announcement.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-10-31 18:25:34 +0100
committerGitHub <noreply@github.com>2022-10-31 18:25:34 +0100
commit968f34300681d8082cf2f824722a3945fc604b2d (patch)
tree910675cc3b8d9022f65bcfa9bee1acee6af8d0e4 /app/models/announcement.rb
parent371563b0e249b6369e04709fb974a8e57413529f (diff)
parent1fe4e5e38c17a726e6aea5d6033139653e89a379 (diff)
Merge pull request #1876 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/announcement.rb')
-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?