[lxc-devel] [lxd/master] db: Fix listing container backups
monstermunchkin on Github
lxc-bot at linuxcontainers.org
Mon Oct 15 16:55:28 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 355 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20181015/7c8107a1/attachment.bin>
-------------- next part --------------
From 25de9371ae0002e933e4bfbf29ab6906637a0516 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Mon, 15 Oct 2018 18:15:51 +0200
Subject: [PATCH] db: Fix listing container backups
Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
lxd/db/containers.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lxd/db/containers.go b/lxd/db/containers.go
index 4e9582d4c2..0503cfd6b4 100644
--- a/lxd/db/containers.go
+++ b/lxd/db/containers.go
@@ -968,7 +968,7 @@ func (c *Cluster) ContainerGetBackups(project, name string) ([]string, error) {
q := `SELECT containers_backups.name FROM containers_backups
JOIN containers ON containers_backups.container_id=containers.id
-JOIN projects ON projects.id=containers.id
+JOIN projects ON projects.id=containers.project_id
WHERE projects.name=? AND containers.name=?`
inargs := []interface{}{project, name}
outfmt := []interface{}{name}
More information about the lxc-devel
mailing list