Skip to content

Commit

Permalink
quick fix TelemetryResponse for drawdown license
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmann authored and grotlue committed Jul 4, 2024
1 parent 1c4ab13 commit 351f44a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.graylog2.telemetry.rest;

import com.google.common.base.Strings;
import org.graylog2.system.stats.elasticsearch.NodeInfo;
import org.graylog2.telemetry.enterprise.TelemetryLicenseStatus;
import org.joda.time.DateTime;
Expand Down Expand Up @@ -160,6 +161,9 @@ private List<TelemetryLicenseStatus> filter(List<TelemetryLicenseStatus> telemet
}

private String formatLicenseString(TelemetryLicenseStatus telemetryLicenseStatus) {
return telemetryLicenseStatus.subject().replace("/", "_").substring(1);
if (!Strings.isNullOrEmpty(telemetryLicenseStatus.subject())) {
return telemetryLicenseStatus.subject().replace("/", "_").substring(1);
}
return "";
}
}

0 comments on commit 351f44a

Please sign in to comment.