mirror of https://github.com/apache/cloudstack.git
quota: though default value for quota_calculated is 0, the usage server
makes it null while entering usage entries. Flipping the condition so as to acocunt for that.
This commit is contained in:
parent
722805e418
commit
298924d519
|
|
@ -104,7 +104,7 @@ public class UsageVO implements Usage, InternalIdentity {
|
|||
private Date endDate = null;
|
||||
|
||||
@Column(name = "quota_calculated")
|
||||
private Integer quotaCalculated = null;
|
||||
private Integer quotaCalculated = 0;
|
||||
|
||||
public Integer getQuotaCalculated() {
|
||||
return quotaCalculated;
|
||||
|
|
|
|||
|
|
@ -470,8 +470,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
|
|||
if (domainId != -1) {
|
||||
sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
|
||||
}
|
||||
sc.addAnd("quotaCalculated", SearchCriteria.Op.NULL);
|
||||
sc.addOr("quotaCalculated", SearchCriteria.Op.EQ, 0);
|
||||
sc.addAnd("quotaCalculated", SearchCriteria.Op.NEQ, 1);
|
||||
if (s_logger.isDebugEnabled()){
|
||||
s_logger.debug("Getting usage records" + usageFilter.getOrderBy());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue