diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-25 15:57:59 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-25 15:57:59 +0200 |
commit | be97a1be587f42a4688825244b025b06172c442a (patch) | |
tree | 95dbaba0d39451efd3ae084e219b6df726d9dc11 /quotas.go | |
parent | c06f52837e5b4aab5335e5a66885c48c24a148a2 (diff) | |
download | guichet-be97a1be587f42a4688825244b025b06172c442a.tar.gz guichet-be97a1be587f42a4688825244b025b06172c442a.zip |
fix some templates
Diffstat (limited to 'quotas.go')
-rw-r--r-- | quotas.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } |