mirror of https://github.com/zulip/zulip.git
export: Add check_metadata flag.
This commit is contained in:
parent
0166f13d83
commit
42ecabe967
|
@ -1455,6 +1455,12 @@ def export_files_from_s3(
|
||||||
|
|
||||||
key = bucket.Object(bkey.key)
|
key = bucket.Object(bkey.key)
|
||||||
|
|
||||||
|
"""
|
||||||
|
For very old realms we may not have proper metadata. If you really need
|
||||||
|
an export to bypass these checks, flip the following flag.
|
||||||
|
"""
|
||||||
|
checking_metadata = True
|
||||||
|
if checking_metadata:
|
||||||
if "realm_id" not in key.metadata:
|
if "realm_id" not in key.metadata:
|
||||||
raise AssertionError(f"Missing realm_id in key metadata: {key.metadata}")
|
raise AssertionError(f"Missing realm_id in key metadata: {key.metadata}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue