Skip to content
Snippets Groups Projects
Commit bc37ec79 authored by vikas rana's avatar vikas rana
Browse files

Merge branch 'legal-with-hyphen-partition' into 'master'

When we attempt to retrieve a legal tag for a specific data-partition ID that contains a hyphen (-), we are unable to fetch the data.

See merge request !619
parents 635ad07f 0ccf1606
No related branches found
No related tags found
1 merge request!619When we attempt to retrieve a legal tag for a specific data-partition ID that contains a hyphen (-), we are unable to fetch the data.
Pipeline #293914 canceled
......@@ -356,7 +356,7 @@ public class CloudantLegalTagRepository implements ILegalTagRepository {
legalTags = allDocResponse.getResponse().getDocsAs(BanckendLegalTag.class)
.stream()
.filter(lTag -> lTag.getIs_Valid() == args.getIsValid())
.filter(f->f.getName().split("-")[0].equalsIgnoreCase(headers.getPartitionId()))
.filter(f->f.getName().length() > headers.getPartitionId().length() && f.getName().substring(0,headers.getPartitionId().length()).equalsIgnoreCase(headers.getPartitionId()))
.collect(Collectors.toList());
} catch (IOException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment