Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
d6eddca6
Commit
d6eddca6
authored
Jan 23, 2014
by
Matija Obreza
Browse files
Don’t return JSON for empty selection list
parent
59b2d25d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/servlet/controller/SelectionController.java
View file @
d6eddca6
...
...
@@ -107,14 +107,16 @@ public class SelectionController extends BaseController {
@ResponseBody
public
List
<
AccessionGeoJson
>
selectionGeo
()
{
List
<
AccessionGeoJson
>
geo
=
new
ArrayList
<
AccessionGeoJson
>();
for
(
AccessionGeo
acnGeo
:
genesysService
.
listAccessionsGeo
(
selectionBean
.
copy
()))
{
AccessionGeoJson
g
=
new
AccessionGeoJson
();
g
.
id
=
acnGeo
.
getAccession
().
getId
();
g
.
lat
=
acnGeo
.
getLatitude
();
g
.
lng
=
acnGeo
.
getLongitude
();
g
.
accessionName
=
acnGeo
.
getAccession
().
getAccessionName
();
g
.
instCode
=
acnGeo
.
getAccession
().
getInstituteCode
();
geo
.
add
(
g
);
if
(
selectionBean
.
size
()
>
0
)
{
for
(
AccessionGeo
acnGeo
:
genesysService
.
listAccessionsGeo
(
selectionBean
.
copy
()))
{
AccessionGeoJson
g
=
new
AccessionGeoJson
();
g
.
id
=
acnGeo
.
getAccession
().
getId
();
g
.
lat
=
acnGeo
.
getLatitude
();
g
.
lng
=
acnGeo
.
getLongitude
();
g
.
accessionName
=
acnGeo
.
getAccession
().
getAccessionName
();
g
.
instCode
=
acnGeo
.
getAccession
().
getInstituteCode
();
geo
.
add
(
g
);
}
}
return
geo
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment