Commit 5f1333be authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

branch.updated might be None

parent f326935d
Pipeline #511 passed with stages
in 54 seconds
...@@ -235,7 +235,7 @@ class Project(Links, NamedModel, TimeStampedModel): ...@@ -235,7 +235,7 @@ class Project(Links, NamedModel, TimeStampedModel):
self.version =[1:] self.version =[1:]
robotpkg = self.robotpkg_set.order_by('-updated').first() robotpkg = self.robotpkg_set.order_by('-updated').first()
branch = self.branch_set.order_by('-updated').first() branch = self.branch_set.order_by('-updated').first()
if branch is not None or robotpkg is not None: if (branch is not None and branch.updated is not None) or robotpkg is not None:
if robotpkg is None: if robotpkg is None:
self.updated = branch.updated self.updated = branch.updated
elif branch is None: elif branch is None:
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