Skip to content

Commit

Permalink
[webui] Refactor Project.is_locket?
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBr committed Jul 28, 2015
1 parent 368494f commit 67b7280
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/api/app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,7 @@ def find_linking_projects
end

def is_locked?
if @is_locked.nil?
@is_locked = flags.where(flag: 'lock', status: 'enable').exists?
end
@is_locked
@is_locked ||= flags.where(flag: 'lock', status: 'enable').exists?
end

def is_unreleased?
Expand Down

0 comments on commit 67b7280

Please sign in to comment.