Skip to content

Commit

Permalink
[FIX] runbot: import json for similar_ids
Browse files Browse the repository at this point in the history
And small fix in fstring.
  • Loading branch information
d-fence authored and Xavier-Do committed Dec 4, 2024
1 parent 03a2039 commit 58f0f81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runbot/models/build_error.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import hashlib
import json
import logging
import re

Expand Down Expand Up @@ -686,9 +687,9 @@ def action_generate_fields(self):
for field in list(re.compile(rec.regex).groupindex.keys()):
existing = self.env['ir.model.fields'].search([('model', '=', 'runbot.build.error.content'), ('name', '=', f'x_{field}')])
if existing:
_logger.info(f"Field x_%s already exists", field)
_logger.info("Field x_%s already exists", field)
else:
_logger.info(f"Creating field x_%s", field)
_logger.info("Creating field x_%s", field)
self.env['ir.model.fields'].create({
'model_id': self.env['ir.model']._get('runbot.build.error.content').id,
'name': f'x_{field}',
Expand Down

0 comments on commit 58f0f81

Please sign in to comment.