Skip to content

Commit

Permalink
Fixed #3 error occurs when delete a default query for all projects
Browse files Browse the repository at this point in the history
  • Loading branch information
hidakatsuya committed Jul 31, 2014
1 parent 6a9d33a commit 42ba90e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/patches/controllers/issues_controller_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def show_all?
end

def default_query_module_enabled?
@project.module_enabled?(:default_custom_query)
@project && @project.module_enabled?(:default_custom_query)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/issues/_sidebar_issues_bottom.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% if @project.module_enabled?(:default_custom_query) && @project.default_query.present? %>
<% if @project && @project.module_enabled?(:default_custom_query) && @project.default_query.present? %>
<script>
(function() {
var allIssuesPath = '<%=j project_issues_path(@project, set_filter: 1) %>';
Expand Down

0 comments on commit 42ba90e

Please sign in to comment.