Issue#839 - fix usage mode when detail is selected
@@ -166,12 +166,13 @@ public class MultiTenantInvoiceConfig extends MultiTenantConfigBase implements I
@Override
public UsageDetailMode getItemResultBehaviorMode() {
final UsageDetailMode mode = staticConfig.getItemResultBehaviorMode();
- if (mode.compareTo(UsageDetailMode.AGGREGATE) != 0 || mode.compareTo(UsageDetailMode.DETAIL) != 0) {
- return UsageDetailMode.AGGREGATE;
- }
+ if (mode == UsageDetailMode.AGGREGATE || mode == UsageDetailMode.DETAIL) {
return mode;
}
+ return UsageDetailMode.AGGREGATE;
+ }
+
@Override
public UsageDetailMode getItemResultBehaviorMode(final InternalTenantContext tenantContext) {
final UsageDetailMode mode = staticConfig.getItemResultBehaviorMode();
