alex / alex/django-admin-histograms

django_histogram.utils.Histogram assert statement is invalid

Aperta
#2 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
106
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

```
assert months or days, 'You must pass either months or days, not both.'
```

The above line check to see that months or days is in the list of args. It doesn't actually check that only one is used. This would work instead:

```
assert months or days, "You must have months or days"
assert not (months and days), "You must pass either months or days, not both"
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.