diff --git a/backend/src/main/java/de/uni_koeln/arachne/dao/jdbc/GenericSQLDao.java b/backend/src/main/java/de/uni_koeln/arachne/dao/jdbc/GenericSQLDao.java index 2313b341b..d1abb1241 100644 --- a/backend/src/main/java/de/uni_koeln/arachne/dao/jdbc/GenericSQLDao.java +++ b/backend/src/main/java/de/uni_koeln/arachne/dao/jdbc/GenericSQLDao.java @@ -274,7 +274,7 @@ public List 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"); diff --git a/backend/src/main/java/de/uni_koeln/arachne/service/ImageService.java b/backend/src/main/java/de/uni_koeln/arachne/service/ImageService.java index db22b9659..34a3b0eac 100644 --- a/backend/src/main/java/de/uni_koeln/arachne/service/ImageService.java +++ b/backend/src/main/java/de/uni_koeln/arachne/service/ImageService.java @@ -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");