Skip to content

Commit

Permalink
Fix always-true conditional check in SpannerDataProviderService (#986)
Browse files Browse the repository at this point in the history
Co-authored-by: marcopremier <[email protected]>
  • Loading branch information
Marco-Premier and marcopremier authored May 10, 2023
1 parent 4fea325 commit c997cca
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ class SpannerDataProvidersService(
override suspend fun replaceDataProviderRequiredDuchies(
request: ReplaceDataProviderRequiredDuchiesRequest
): DataProvider {
grpcRequire(request.externalDataProviderId != null) {
"externalDataProviderId field is missing."
}
grpcRequire(request.externalDataProviderId != 0L) { "externalDataProviderId field is missing." }
try {
return ReplaceDataProviderRequiredDuchies(request).execute(client, idGenerator)
} catch (e: DataProviderNotFoundException) {
Expand Down

0 comments on commit c997cca

Please sign in to comment.