alex / alex/django-admin-histograms

django_histogram.utils.Histogram assert statement is invalid

Đang mở
#2 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
106
Fork
9
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

```
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"
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.