From 1c67efefa3ce765d6b43505f6a7aab2beaaa5be8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20-=20Le=20Filament?= <remi@le-filament.com>
Date: Thu, 4 Aug 2022 12:02:44 +0200
Subject: [PATCH] [FIX] make cache vol external only if prod is defined

---
 templates/restore-odootest.yaml.j2  | 2 ++
 templates/restore2-odootest.yaml.j2 | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/templates/restore-odootest.yaml.j2 b/templates/restore-odootest.yaml.j2
index 422af07..8733ce4 100644
--- a/templates/restore-odootest.yaml.j2
+++ b/templates/restore-odootest.yaml.j2
@@ -44,6 +44,8 @@ networks:
 
 volumes:
     backups_odoo_backup_cache:
+{% if odoo_prod is defined %}
         external: true
+{% endif %}
     {{ item.dir }}_filestore:
         external: true
diff --git a/templates/restore2-odootest.yaml.j2 b/templates/restore2-odootest.yaml.j2
index 86b0a4b..36fc614 100644
--- a/templates/restore2-odootest.yaml.j2
+++ b/templates/restore2-odootest.yaml.j2
@@ -44,6 +44,8 @@ networks:
 
 volumes:
     backups_odoo_backup2_cache:
+{% if odoo_prod is defined %}
         external: true
+{% endif %}
     {{ item.dir }}_filestore:
         external: true
-- 
GitLab