bug fix
This commit is contained in:
parent
95a522d8d0
commit
29af123e06
|
@ -521,7 +521,7 @@ public class CommunityApiController {
|
|||
public CommunityOpenAIRECommunities getOpenAireCommunities(@PathVariable final String zenodoId) throws CommunityException, ResourceNotFoundException {
|
||||
final CommunityOpenAIRECommunities res = new CommunityOpenAIRECommunities();
|
||||
res.setZenodoid(zenodoId);
|
||||
res.setOpenAirecommunitylist(communityService.getOpenAIRECommunities(zenodoId));
|
||||
res.setOpenAirecommunitylist(communityService.getOpenAIRECommunitiesByZenodoId(zenodoId));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -474,7 +474,7 @@ public class CommunityService {
|
|||
return getCommunity(id);
|
||||
}
|
||||
|
||||
public List<String> getOpenAIRECommunities(final String zenodoId) throws CommunityException {
|
||||
public List<String> getOpenAIRECommunitiesByZenodoId(final String zenodoId) throws CommunityException {
|
||||
try {
|
||||
return dbCommunityRepository.findByZenodoId(zenodoId);
|
||||
} catch (final Throwable e) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import eu.dnetlib.openaire.community.model.DbCommunity;
|
|||
@ConditionalOnProperty(value = "openaire.exporter.enable.community", havingValue = "true")
|
||||
public interface DbCommunityRepository extends JpaRepository<DbCommunity, String> {
|
||||
|
||||
@Query(value = "select id from communities where $1 = ANY(array_append(other_zenodo_communities, main_zenodo_community))", nativeQuery = true)
|
||||
@Query(value = "select id from communities where ?1 = ANY(array_append(other_zenodo_communities, main_zenodo_community))", nativeQuery = true)
|
||||
List<String> findByZenodoId(String zenodoId);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue