mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
Merge pull request #5967 from raman-bt/6464-persona-query-exception
Fixed malformed queries.
This commit is contained in:
commit
e58cfc59c0
@ -277,7 +277,7 @@ public class PersonaAccount {
|
||||
public static Collection<PersonaAccount> getPersonaAccountsForAccount(long accountId) throws CentralRepoException {
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE
|
||||
+ " WHERE persona_accounts.account_id = " + accountId
|
||||
+ "AND p.status_id != " + Persona.PersonaStatus.DELETED.getStatusId();
|
||||
+ " AND personas.status_id != " + Persona.PersonaStatus.DELETED.getStatusId();
|
||||
|
||||
CentralRepository cr = CentralRepository.getInstance();
|
||||
|
||||
@ -306,7 +306,7 @@ public class PersonaAccount {
|
||||
public static Collection<PersonaAccount> getPersonaAccountsForIdentifierLike(String accountIdentifierSubstring) throws CentralRepoException {
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE
|
||||
+ " WHERE LOWER(accounts.account_unique_identifier) LIKE LOWER('%" + accountIdentifierSubstring + "%')"
|
||||
+ "AND p.status_id != " + Persona.PersonaStatus.DELETED.getStatusId();
|
||||
+ " AND personas.status_id != " + Persona.PersonaStatus.DELETED.getStatusId();
|
||||
|
||||
CentralRepository cr = CentralRepository.getInstance();
|
||||
if (cr != null) {
|
||||
@ -331,7 +331,9 @@ public class PersonaAccount {
|
||||
*/
|
||||
public static Collection<PersonaAccount> getPersonaAccountsForAccount(Account account) throws CentralRepoException {
|
||||
String queryClause = PERSONA_ACCOUNTS_QUERY_CALUSE
|
||||
+ " WHERE LOWER(accounts.account_unique_identifier) LIKE LOWER('%" + account.getTypeSpecificID() + "%') AND type_name = '" + account.getAccountType().getTypeName() + "' ";
|
||||
+ " WHERE LOWER(accounts.account_unique_identifier) LIKE LOWER('%" + account.getTypeSpecificID() + "%')"
|
||||
+ " AND type_name = '" + account.getAccountType().getTypeName() + "' "
|
||||
+ " AND personas.status_id != " + Persona.PersonaStatus.DELETED.getStatusId();
|
||||
|
||||
CentralRepository cr = CentralRepository.getInstance();
|
||||
if (cr != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user