Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
24294f32
Commit
24294f32
authored
Nov 26, 2018
by
Guilhem Saurel
Browse files
projects: enforce valid_name on save
parent
8f2e3e2f
Pipeline
#1926
passed with stages
in 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
24294f32
...
...
@@ -181,6 +181,10 @@ class Project(Links, NamedModel, TimeStampedModel):
debug
=
models
.
BooleanField
(
default
=
False
)
from_gepetto
=
models
.
BooleanField
(
default
=
True
)
def
save
(
self
,
*
args
,
**
kwargs
):
self
.
name
=
valid_name
(
self
.
name
)
super
().
save
(
*
args
,
**
kwargs
)
def
git_path
(
self
):
return
settings
.
RAINBOARD_GITS
/
self
.
main_namespace
.
slug
/
self
.
slug
.
strip
()
# workaround SafeText TypeError
...
...
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