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
5773bd8c
Commit
5773bd8c
authored
Jul 11, 2018
by
Guilhem Saurel
Browse files
fix dependencies regex
parent
95554cce
Pipeline
#932
passed with stages
in 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
5773bd8c
...
@@ -224,7 +224,7 @@ class Project(Links, NamedModel, TimeStampedModel):
...
@@ -224,7 +224,7 @@ class Project(Links, NamedModel, TimeStampedModel):
self
.
save
()
self
.
save
()
except
DataError
:
except
DataError
:
self
.
__dict__
[
value
]
=
old
self
.
__dict__
[
value
]
=
old
for
dependency
in
re
.
findall
(
r
'ADD_[^ ]+_DEPENDENCY\s*\(["\']([^ ]+).*["\']\)'
,
content
,
re
.
I
):
for
dependency
in
re
.
findall
(
r
'ADD_[^ ]+_DEPENDENCY\s*\(["\']([^
"\'
]+).*["\']\)'
,
content
,
re
.
I
):
project
=
Project
.
objects
.
filter
(
slug
=
dependency
)
project
=
Project
.
objects
.
filter
(
slug
=
dependency
)
if
project
.
exists
():
if
project
.
exists
():
dependency
,
_
=
Dependency
.
objects
.
get_or_create
(
project
=
self
,
library
=
project
.
first
())
dependency
,
_
=
Dependency
.
objects
.
get_or_create
(
project
=
self
,
library
=
project
.
first
())
...
...
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