Skip to content

Commit 4f7f240

Browse files
v-rudkovskiyr-brown
authored andcommitted
fix error "Property 'expirationTime' must follow XML DateTime format."
1 parent 955ce97 commit 4f7f240

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/netlicensing/converters.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ namespace netlicensing {
109109
inline parameters_type toParametersList<Token>(Token value) {
110110
parameters_type params = toParametersList<BaseEntity>(value);
111111
params.push_back(std::make_pair(VENDOR_NUMBER, value.getVendorNumber()));
112-
params.push_back(std::make_pair(EXPIRATION_TIME, value.getExpirationTime().toString()));
112+
113+
const std::string expirationTime = value.getExpirationTime().toString();
114+
if (!expirationTime.empty()) {
115+
params.push_back(std::make_pair(EXPIRATION_TIME, expirationTime));
116+
}
117+
113118
params.push_back(std::make_pair(TOKEN_TYPE, tokenTypeToString(value.getTokenType())));
114119
return params;
115120
}

0 commit comments

Comments
 (0)