mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
export: Make Config errors more clear.
This commit is contained in:
@@ -572,7 +572,22 @@ def export_from_config(
|
||||
if config.filter_args is not None:
|
||||
filter_parms.update(config.filter_args)
|
||||
assert model is not None
|
||||
try:
|
||||
query = model.objects.filter(**filter_parms)
|
||||
except Exception:
|
||||
print(
|
||||
f"""
|
||||
Something about your Config seems to make it difficult
|
||||
to construct a query.
|
||||
|
||||
table: {table}
|
||||
parent: {parent.table}
|
||||
|
||||
filter_parms: {filter_parms}
|
||||
"""
|
||||
)
|
||||
raise
|
||||
|
||||
rows = list(query)
|
||||
|
||||
elif config.id_source:
|
||||
|
||||
Reference in New Issue
Block a user