Commit 01fc0fb1 authored by Douwe Maan's avatar Douwe Maan

Merge branch '4110-fix-push-rules-on-geo-secondary' into 'master'

Fix viewing default push rules on a Geo secondary

Closes #4110

See merge request gitlab-org/gitlab-ee!3559
parents ed0f3234 633314b6
---
title: Fix viewing default push rules on a Geo secondary
merge_request: 3559
author:
type: fixed
......@@ -40,6 +40,6 @@ class Admin::PushRulesController < Admin::ApplicationController
end
def push_rule
@push_rule ||= PushRule.find_or_create_by(is_sample: true)
@push_rule ||= PushRule.find_or_initialize_by(is_sample: true)
end
end
......@@ -6,7 +6,7 @@
%hr.clearfix
= form_for [:admin, @push_rule] do |f|
= form_for @push_rule, url: admin_push_rule_path, method: :put do |f|
- if @push_rule.errors.any?
.alert.alert-danger
- @push_rule.errors.full_messages.each do |msg|
......
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