Skip to content

Commit

Permalink
Hotfix/unique id optimization (#629)
Browse files Browse the repository at this point in the history
* Optimize generate unique id

* Bump up version

* Update ubuntu from 18.04 to ubuntu-latest in ci.yml
  • Loading branch information
hilpitome authored Jan 31, 2024
1 parent 9f8072c commit af08fc2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
jobs:
run-unit-tests:

runs-on: ubuntu-18.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<artifactId>opensrp-server-core</artifactId>
<packaging>jar</packaging>
<version>2.14.7-SNAPSHOT</version>
<version>2.14.8-SNAPSHOT</version>
<name>opensrp-server-core</name>
<description>OpenSRP Server Core module</description>
<url>https://github.com/OpenSRP/opensrp-server-core</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public UniqueId findByIdentifierSourceOrderByIdDesc(Long idSource) {
example.createCriteria().andIdSourceEqualTo(idSource);
example.setOrderByClause("id DESC");

List<org.opensrp.domain.postgres.UniqueId> uniqueIds = uniqueIdMapper.selectByExample(example);
List<org.opensrp.domain.postgres.UniqueId> uniqueIds = uniqueIdMapper.selectMany(example, 0, 1);
List<UniqueId> convertedUniqueIds = convert(uniqueIds);
return convertedUniqueIds != null && convertedUniqueIds.size() >= 1 ? convertedUniqueIds.get(0) : null;
}
Expand Down

0 comments on commit af08fc2

Please sign in to comment.