Fix a bug in getLineageSql, where it would return the empty string. This could cause downstream problems. Fixes bug #11616
This commit is contained in:
parent
4eb013ef03
commit
2c08b4e712
3 changed files with 27 additions and 6 deletions
|
|
@ -461,10 +461,6 @@ sub getLineage {
|
|||
|
||||
my $sql = $self->getLineageSql($relatives,$rules);
|
||||
|
||||
unless ($sql) {
|
||||
return [];
|
||||
}
|
||||
|
||||
my @lineage;
|
||||
my %relativeCache;
|
||||
my $sth = $self->session->db->read($sql);
|
||||
|
|
@ -732,7 +728,8 @@ sub getLineageSql {
|
|||
}
|
||||
## finish up our where clause
|
||||
if (!scalar(@whereModifiers)) {
|
||||
return "";
|
||||
#Return valid SQL that will never select an asset.
|
||||
return q|select * from asset where assetId="###---###"|;
|
||||
}
|
||||
$where .= ' and ('.join(" or ",@whereModifiers).')';
|
||||
if (exists $rules->{whereClause} && $rules->{whereClause}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue