aboutsummaryrefslogtreecommitdiff
path: root/quotas.go
diff options
context:
space:
mode:
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
}