mirror of
https://github.com/odoo/runbot.git
synced 2025-03-31 23:35:45 +07:00
[REF] runbot: Consider empty returned values
When installing a clean runbot instance a bad query is made because there is not any build yet. With this commmit, the query is not made when there are no builds directories found on the filesystem.
This commit is contained in:
parent
dcdd16038b
commit
c9de61a320
@ -307,6 +307,7 @@ class runbot_build(models.Model):
|
|||||||
root = self.env['runbot.repo']._root()
|
root = self.env['runbot.repo']._root()
|
||||||
build_dir = os.path.join(root, 'build')
|
build_dir = os.path.join(root, 'build')
|
||||||
builds = os.listdir(build_dir)
|
builds = os.listdir(build_dir)
|
||||||
|
if builds:
|
||||||
self.env.cr.execute("""
|
self.env.cr.execute("""
|
||||||
SELECT dest
|
SELECT dest
|
||||||
FROM runbot_build
|
FROM runbot_build
|
||||||
|
Loading…
Reference in New Issue
Block a user