mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-08 14:15:35 +08:00
Found the fix
This commit is contained in:
parent
10554fecb4
commit
8e42dba7de
1 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ class Protocol < ApplicationRecord
|
||||||
with_options if: :in_repository_public? do |protocol|
|
with_options if: :in_repository_public? do |protocol|
|
||||||
# Public protocol must have unique name inside its team
|
# Public protocol must have unique name inside its team
|
||||||
protocol
|
protocol
|
||||||
.validates_uniqueness_of :name,
|
.validates_uniqueness_of :name, case_sensitive: false,
|
||||||
scope: :team,
|
scope: :team,
|
||||||
conditions: -> {
|
conditions: -> {
|
||||||
where(
|
where(
|
||||||
|
@ -57,7 +57,7 @@ class Protocol < ApplicationRecord
|
||||||
with_options if: :in_repository_private? do |protocol|
|
with_options if: :in_repository_private? do |protocol|
|
||||||
# Private protocol must have unique name inside its team & user scope
|
# Private protocol must have unique name inside its team & user scope
|
||||||
protocol
|
protocol
|
||||||
.validates_uniqueness_of :name,
|
.validates_uniqueness_of :name, case_sensitive: false,
|
||||||
scope: [:team, :added_by],
|
scope: [:team, :added_by],
|
||||||
conditions: -> {
|
conditions: -> {
|
||||||
where(
|
where(
|
||||||
|
@ -70,7 +70,7 @@ class Protocol < ApplicationRecord
|
||||||
with_options if: :in_repository_archived? do |protocol|
|
with_options if: :in_repository_archived? do |protocol|
|
||||||
# Archived protocol must have unique name inside its team & user scope
|
# Archived protocol must have unique name inside its team & user scope
|
||||||
protocol
|
protocol
|
||||||
.validates_uniqueness_of :name,
|
.validates_uniqueness_of :name, case_sensitive: false,
|
||||||
scope: [:team, :added_by],
|
scope: [:team, :added_by],
|
||||||
conditions: -> {
|
conditions: -> {
|
||||||
where(
|
where(
|
||||||
|
|
Loading…
Add table
Reference in a new issue