From be97a1be587f42a4688825244b025b06172c442a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 25 Sep 2023 15:57:59 +0200 Subject: fix some templates --- quotas.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'quotas.go') 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 } -- cgit v1.2.3