Closed agy-why closed 1 year ago
In a daiquiri instance, when the admin type in something in the search field of the Django admin interface of Query and actually search for it - Internal Server error is produced.
Django gives this Error:
FieldError at /admin/daiquiri_query/downloadjob/ Cannot resolve keyword 'schema_name' into field. Choices are: client_ip, creation_time, destruction_time, end_time, error_summary, execution_duration, format_key, id, job, job_id, job_ptr, job_ptr_id, job_type, max_records, owner, owner_id, phase, response_format, run_id, start_time
Looking at daiquiri/daiquiri/query/admin.py one sees the origin of the error message:
daiquiri/daiquiri/query/admin.py
class DownloadJobAdmin(JobAdmin): search_fields = JobAdmin.search_fields + ['schema_name', 'job__table_name', 'format_key'] list_display = JobAdmin.list_display + ['job', 'file_path'] actions = ['abort_job', 'archive_job']
It seems that these fields are not present in the JobAdmin keys.
schema_name is not in the available keys but maybe behind one: job__schema_name
schema_name
job__schema_name
On could replace schema_name with <some_key>__schema_name. Just need to find which key is the correct one.
<some_key>__schema_name
see #116
CONTEXT
In a daiquiri instance, when the admin type in something in the search field of the Django admin interface of Query and actually search for it - Internal Server error is produced.
PROBLEM
Django gives this Error:
Looking at
daiquiri/daiquiri/query/admin.py
one sees the origin of the error message:It seems that these fields are not present in the JobAdmin keys.
Suggestion
schema_name
is not in the available keys but maybe behind one:job__schema_name
On could replace
schema_name
with<some_key>__schema_name
. Just need to find which key is the correct one.