Fix the fill_in_default_live_video_url! method

This commit is contained in:
2024-02-04 14:24:55 +00:00
parent e8e143355d
commit d5faecdd12
+2 -1
View File
@@ -86,6 +86,7 @@ class Course < ApplicationRecord
end
def fill_in_default_live_video_url!
lectures.where(live_video_url: nil).update!(live_video_url: self.default_live_video_url)
raise "No default live video URL set" if self.default_live_video_url.nil?
lectures.where(live_video_url: nil).update_all!(live_video_url: self.default_live_video_url)
end
end