Skip to content
GitLab
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
c3096d9b
Commit
c3096d9b
authored
Oct 19, 2018
by
Guilhem Saurel
Browse files
projects name should not have underscores
parent
db719b98
Pipeline
#1747
passed with stages
in 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
c3096d9b
...
...
@@ -11,9 +11,8 @@ from django.template.loader import get_template
from
django.utils.dateparse
import
parse_datetime
from
django.utils.safestring
import
mark_safe
import
requests
import
git
import
requests
from
autoslug
import
AutoSlugField
from
ndh.models
import
Links
,
NamedModel
,
TimeStampedModel
from
ndh.utils
import
enum_to_choices
,
query_sum
...
...
@@ -251,7 +250,7 @@ class Project(Links, NamedModel, TimeStampedModel):
if
search
:
try
:
old
=
getattr
(
self
,
value
)
new
=
search
.
groups
()[
0
].
strip
(
'''
\r\n\t
'"'''
)
new
=
search
.
groups
()[
0
].
strip
(
'''
\r\n\t
'"'''
)
.
replace
(
'_'
,
'-'
)
if
old
!=
new
:
setattr
(
self
,
value
,
new
)
self
.
save
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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