Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
19ade869
Commit
19ade869
authored
Apr 25, 2019
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid 500 when saving long values
parent
5bd999ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
ee/app/models/geo_node.rb
ee/app/models/geo_node.rb
+1
-1
ee/spec/models/geo_node_spec.rb
ee/spec/models/geo_node_spec.rb
+1
-0
No files found.
ee/app/models/geo_node.rb
View file @
19ade869
...
...
@@ -15,7 +15,7 @@ class GeoNode < ApplicationRecord
has_many
:namespaces
,
through: :geo_node_namespace_links
has_one
:status
,
class_name:
'GeoNodeStatus'
validates
:name
,
presence:
true
,
uniqueness:
{
case_sensitive:
false
}
validates
:name
,
presence:
true
,
uniqueness:
{
case_sensitive:
false
}
,
length:
{
maximum:
255
}
validates
:url
,
presence:
true
,
addressable_url:
true
validates
:internal_url
,
addressable_url:
true
,
allow_blank:
true
,
allow_nil:
true
...
...
ee/spec/models/geo_node_spec.rb
View file @
19ade869
...
...
@@ -33,6 +33,7 @@ describe GeoNode, :geo, type: :model do
it
{
is_expected
.
to
validate_presence_of
(
:name
)
}
it
{
is_expected
.
to
validate_presence_of
(
:url
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:name
).
case_insensitive
}
it
{
is_expected
.
to
validate_length_of
(
:name
).
is_at_most
(
255
)
}
context
'when validating primary node'
do
it
'cannot be disabled'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment