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
91b3ef3f
Commit
91b3ef3f
authored
Mar 01, 2014
by
Matija Obreza
Browse files
FIX NPE in statisticsSpeciesByInstitute
parent
13456547
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/model/genesys/Accession.java
View file @
91b3ef3f
...
...
@@ -58,7 +58,7 @@ public class Accession extends VersionedAuditedModel {
@JoinColumn
(
name
=
"taxonomyId"
)
private
Taxonomy
taxonomy1
;
@ManyToOne
(
cascade
=
{},
optional
=
fals
e
)
@ManyToOne
(
cascade
=
{},
optional
=
tru
e
)
@JoinColumn
(
name
=
"taxonomyId2"
)
private
Taxonomy2
taxonomy
;
...
...
src/main/java/org/genesys2/server/service/impl/GenesysServiceImpl.java
View file @
91b3ef3f
...
...
@@ -366,7 +366,8 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
public
Page
<
Object
[]>
statisticsSpeciesByInstitute
(
FaoInstitute
institute
,
Pageable
pageable
)
{
Page
<
Object
[]>
page
=
accessionRepository
.
statisticsSpeciesInInstitute
(
institute
,
pageable
);
for
(
Object
[]
r
:
page
.
getContent
())
{
r
[
0
]
=
taxonomyService
.
get
((
Long
)
r
[
0
]);
if
(
r
[
0
]
!=
null
)
r
[
0
]
=
taxonomyService
.
get
((
Long
)
r
[
0
]);
}
return
page
;
}
...
...
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