mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: manage case when there is no start
SInce the previous version the build end is written when going in any done state. This means that when a build is skipped, it has a end but no start. Adapat the build dime to manage this use case.
This commit is contained in:
parent
9024594df2
commit
8c2e7a5781
@ -441,7 +441,7 @@ class BuildResult(models.Model):
|
||||
@api.depends('build_start', 'build_end', 'global_state')
|
||||
def _compute_build_time(self):
|
||||
for build in self:
|
||||
if build.build_end and build.global_state != 'waiting':
|
||||
if build.build_end and build.build_start:
|
||||
build.build_time = int(dt2time(build.build_end) - dt2time(build.build_start))
|
||||
elif build.build_start:
|
||||
build.build_time = int(time.time() - dt2time(build.build_start))
|
||||
|
Loading…
Reference in New Issue
Block a user