alex / alex/django-admin-histograms

django_histogram.utils.Histogram assert statement is invalid

未关闭
#2 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
106
派生
9
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。