Commit aff72ece authored by Rubén Dávila's avatar Rubén Dávila Committed by Mike Greiling
Browse files

Fix broken spec.

parent_id is being set to 0 by RSpec.
parent 8828331ff6a7
......@@ -123,7 +123,7 @@ def visibility_level_allowed_by_sub_groups
def visibility_level_allowed_by_parent?(level = self.visibility_level)
return true unless parent_id.present? || parent
return true unless parent_id && parent_id.nonzero?
level <= parent.visibility_level
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment