Skip to content

Commit f0c5388

Browse files
committed
fix: coalesce the max download count in case the database is empty
1 parent 2000f64 commit f0c5388

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/eclipse/openvsx/repositories/ExtensionRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public interface ExtensionRepository extends Repository<Extension, Long> {
3737

3838
long count();
3939

40-
@Query("select max(e.downloadCount) from Extension e")
40+
@Query("select coalesce(max(e.downloadCount), 0) from Extension e")
4141
int getMaxDownloadCount();
4242

4343
@Query("select e from Extension e where concat(e.namespace.name, '.', e.name) not in(?1)")

0 commit comments

Comments
 (0)