jazzband / jazzband/django-admin2

ModelAdmin2.search_fields assigned twice.

Open
#376 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.2k
Forks
147
PR merge metrics
No merged PRs in 30d

Description

`ModelAdmin2.search_fields` assigned twice. Is it really necessary?

``` python
# ...
search_fields = ()
# ...

search_fields = []
```

I've removed the line (types.py):

``` python
search_fields = []
```

Ran the tests, and I get no error.

Contributor guide

Open the contributing guide

Research direction

The duplicate assignment is in types.py; start by inspecting both ModelAdmin2.search_fields declarations and run the existing test suite. Done means the redundant assignment is removed without changing behavior and the tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.