mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: adapt migration script
Fix a failure when a build error is not linked to any build. It happens when a build error was merged into another.
This commit is contained in:
parent
56e242a660
commit
a6823f6d53
@ -76,7 +76,7 @@ def migrate(cr, version):
|
||||
build_count = 0
|
||||
first_seen_build_id = first_seen_date = last_seen_build_id = last_seen_date = None
|
||||
if error_id in vals_by_error:
|
||||
error_vals = [vals_by_error[error_id] for error_id in all_errors]
|
||||
error_vals = [vals_by_error[error_id] for error_id in all_errors if error_id in vals_by_error]
|
||||
first_seen_build_id = min(vals[0] for vals in error_vals)
|
||||
first_seen_date = min(vals[1] for vals in error_vals)
|
||||
last_seen_build_id = max(vals[2] for vals in error_vals)
|
||||
|
Loading…
Reference in New Issue
Block a user