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
dcfb8812
Commit
dcfb8812
authored
Feb 01, 2018
by
Guilhem Saurel
Browse files
project.updated: max(robotpkg, branch)
parent
bd6ca8ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
dcfb8812
...
...
@@ -230,7 +230,9 @@ class Project(Links, NamedModel, TimeStampedModel):
return
self
.
robotpkg_set
.
count
()
def
update
(
self
):
self
.
updated
=
self
.
branch_set
.
order_by
(
'-updated'
).
first
().
updated
robotpkg
=
self
.
robotpkg_set
.
order_by
(
'-updated'
).
first
()
branch
=
self
.
branch_set
.
order_by
(
'-updated'
).
first
().
updated
self
.
updated
=
max
(
branch
,
robotpkg
.
updated
)
if
robotpkg
else
branch
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