Reformat and remove stale debugging
This commit is contained in:
@@ -695,21 +695,21 @@ class OSINTSearch(LoginRequiredMixin, View):
|
||||
|
||||
def _field_options(self, model_cls: type[models.Model]) -> list[dict[str, str]]:
|
||||
options = []
|
||||
for field in model_cls._meta.get_fields():
|
||||
for model_field in model_cls._meta.get_fields():
|
||||
# Skip reverse/accessor relations (e.g. ManyToManyRel) that are not
|
||||
# directly searchable as user-facing fields in this selector.
|
||||
if field.auto_created and not field.concrete:
|
||||
if model_field.auto_created and not model_field.concrete:
|
||||
continue
|
||||
if field.name == "user":
|
||||
if model_field.name == "user":
|
||||
continue
|
||||
label = getattr(
|
||||
field,
|
||||
model_field,
|
||||
"verbose_name",
|
||||
str(field.name).replace("_", " "),
|
||||
str(model_field.name).replace("_", " "),
|
||||
)
|
||||
options.append(
|
||||
{
|
||||
"value": field.name,
|
||||
"value": model_field.name,
|
||||
"label": str(label).title(),
|
||||
}
|
||||
)
|
||||
@@ -892,7 +892,6 @@ class OSINTSearch(LoginRequiredMixin, View):
|
||||
object_list: list[Any],
|
||||
request_type: str,
|
||||
) -> list[dict[str, Any]]:
|
||||
context_type = _context_type(request_type)
|
||||
rows = []
|
||||
for item in object_list:
|
||||
row = {"id": str(item.pk), "cells": [], "actions": []}
|
||||
|
||||
Reference in New Issue
Block a user