aboutsummaryrefslogtreecommitdiff
path: root/quotas.go
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-09-25 15:57:59 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-09-25 15:57:59 +0200
commitbe97a1be587f42a4688825244b025b06172c442a (patch)
tree95dbaba0d39451efd3ae084e219b6df726d9dc11 /quotas.go
parentc06f52837e5b4aab5335e5a66885c48c24a148a2 (diff)
downloadguichet-be97a1be587f42a4688825244b025b06172c442a.tar.gz
guichet-be97a1be587f42a4688825244b025b06172c442a.zip
fix some templates
Diffstat (limited to 'quotas.go')
-rw-r--r--quotas.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/quotas.go b/quotas.go
index e077ac8..3eec9b8 100644
--- a/quotas.go
+++ b/quotas.go
@@ -58,11 +58,11 @@ func entryToQuota(entry *ldap.Entry, field string) (int64, error) {
func NewUserQuotaFromEntry(entry *ldap.Entry) *UserQuota {
quotas := NewUserQuota()
- if q, err := entryToQuota(entry, FIELD_QUOTA_WEBSITE_COUNT); err != nil {
+ if q, err := entryToQuota(entry, FIELD_QUOTA_WEBSITE_COUNT); err == nil {
quotas.WebsiteCount = q
}
- if q, err := entryToQuota(entry, FIELD_QUOTA_WEBSITE_SIZE_BURSTED); err != nil {
+ if q, err := entryToQuota(entry, FIELD_QUOTA_WEBSITE_SIZE_BURSTED); err == nil {
quotas.WebsiteSizeBursted = q
}