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

Fix broken spec.

parent_id is being set to 0 by RSpec.
parent fc95395c
...@@ -123,7 +123,7 @@ class Group < Namespace ...@@ -123,7 +123,7 @@ class Group < Namespace
end end
def visibility_level_allowed_by_parent?(level = self.visibility_level) 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 level <= parent.visibility_level
end end
......
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