Skip to content

Commit

Permalink
First attempt to ignore images whose entity is marked as deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
dersmon committed Nov 22, 2024
1 parent c3727e7 commit ae30b3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public List<Image> getImageList(final String type, final long internalId) {
final String sql = "SELECT `marbilder`.`DateinameMarbilder`, `arachneentityidentification`.`ArachneEntityID`, `marbilder`.`EntityOrder`"
+ "FROM `marbilder` " + "LEFT JOIN `arachneentityidentification` "
+ "ON (`arachneentityidentification`.`TableName` = 'marbilder' "
+ "AND `arachneentityidentification`.`ForeignKey` = `marbilder`.`PS_MARBilderID`) " + "WHERE "
+ "AND `arachneentityidentification`.`ForeignKey` = `marbilder`.`PS_MARBilderID` AND `arachneentityidentification`.`deleted` = 0) " + "WHERE "
+ SQLToolbox.getQualifiedFieldname("marbilder", SQLToolbox.generateForeignKeyName(type)) + " = ? "
+ "ORDER BY `marbilder`.`EntityOrder` ASC"
+ userRightsService.getSQL("marbilder");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void addImages(final Dataset dataset) {
if (excludeList.contains(arachneId.getTableName())) {
return;
} else {
if ("marbilder".equals(arachneId.getTableName())) {
if ("marbilder".equals(arachneId.getTableName()) && !arachneId.deleted) {
final Image image = new Image();
image.setImageId(arachneId.getArachneEntityID());
String fileName = dataset.getField("marbilder.DateinameMarbilder");
Expand Down

0 comments on commit ae30b3e

Please sign in to comment.