mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Prefer the metadata JSON file over the version JSON file (#7048)
This commit is contained in:
parent
3bb6a32ab9
commit
91585a1fa6
@ -166,10 +166,7 @@ class Command(CryptMixin, BaseCommand):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
if version_path.exists():
|
if metadata_path.exists():
|
||||||
with version_path.open() as infile:
|
|
||||||
self.version = json.load(infile)["version"]
|
|
||||||
elif metadata_path.exists():
|
|
||||||
with metadata_path.open() as infile:
|
with metadata_path.open() as infile:
|
||||||
data = json.load(infile)
|
data = json.load(infile)
|
||||||
self.version = data["version"]
|
self.version = data["version"]
|
||||||
@ -179,6 +176,9 @@ class Command(CryptMixin, BaseCommand):
|
|||||||
)
|
)
|
||||||
elif EXPORTER_CRYPTO_SETTINGS_NAME in data:
|
elif EXPORTER_CRYPTO_SETTINGS_NAME in data:
|
||||||
self.load_crypt_params(data)
|
self.load_crypt_params(data)
|
||||||
|
elif version_path.exists():
|
||||||
|
with version_path.open() as infile:
|
||||||
|
self.version = json.load(infile)["version"]
|
||||||
|
|
||||||
if self.version and self.version != version.__full_version_str__:
|
if self.version and self.version != version.__full_version_str__:
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user