fix error

This commit is contained in:
邱博亞 2022-03-17 15:57:44 +08:00
parent 5b8cdfd69b
commit 8494f37661
1 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ class Bulletin
end end
end end
def check_limit def check_limit
check_status_limit(update_user) check_status_limit(update_user).length>0 ? false : true
end end
def check_status_limit(user,check_only=false) def check_status_limit(user,check_only=false)
role_ids = user.member_profile.roles.map(&:id) rescue [] role_ids = user.member_profile.roles.map(&:id) rescue []
@ -168,7 +168,7 @@ class Bulletin
end end
end.compact end.compact
end end
reach_limit.length>0 ? false : true reach_limit
end end
def set_expire def set_expire
self.expirable_created_at = Time.now if self.is_preview self.expirable_created_at = Time.now if self.is_preview