Commit dcfb8812 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

project.updated: max(robotpkg, branch)

parent bd6ca8ce
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment