master courses: fix tags to be locked without content
Change-Id: I500978b657524b822f13305fa24211f5dc83a752 Reviewed-on: https://gerrit.instructure.com/111529 Tested-by: Jenkins Reviewed-by: Jeremy Stanley <jeremy@instructure.com> Product-Review: James Williams <jamesw@instructure.com> QA-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
ebc9f85b2a
commit
db41925a7e
|
@ -39,8 +39,6 @@ class MasterCourses::MasterContentTag < ActiveRecord::Base
|
|||
if self.restrictions_changed? && (self.restrictions.keys != [:all])
|
||||
if (self.restrictions.keys - MasterCourses::LOCK_TYPES).any?
|
||||
self.errors.add(:restrictions, "Invalid settings")
|
||||
elsif self.restrictions.present? && !self.restrictions[:content]
|
||||
self.errors.add(:restrictions, "Content must be restricted if restrictions are present")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue