From 591cb8aa2e1dd2638abb5485907e242b8ed2194f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 17 Apr 2021 09:10:47 +0200 Subject: [PATCH] misc: ignore .max_id in zip export/import (#53225) --- wcs/admin/settings.py | 2 +- wcs/publisher.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wcs/admin/settings.py b/wcs/admin/settings.py index 74264fa8e..8f584ab7f 100644 --- a/wcs/admin/settings.py +++ b/wcs/admin/settings.py @@ -1042,7 +1042,7 @@ class SettingsDirectory(QommonSettingsDirectory): if not os.path.exists(path): continue for f in os.listdir(path): - if f == '.indexes': + if f in ('.indexes', '.max_id'): continue z.write(os.path.join(path, f), os.path.join(d, f)) if 'datasources' in self.dirs: diff --git a/wcs/publisher.py b/wcs/publisher.py index a43971b3e..3b88f9091 100644 --- a/wcs/publisher.py +++ b/wcs/publisher.py @@ -203,7 +203,7 @@ class WcsPublisher(QommonPublisher): return rv for f in z.namelist(): - if '.indexes' in f: + if f in ('.indexes', '.max_id'): continue if os.path.dirname(f) in ( 'formdefs_xml',