fix: [Attribute:editPostProcessing] Fixed sighting capture

pull/9438/head
Sami Mokaddem 2023-11-27 11:23:30 +01:00
parent f8f02b053a
commit d758516042
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 2 additions and 2 deletions

View File

@ -2712,7 +2712,7 @@ class Attribute extends AppModel
}
$attributeId = $this->updateLookupTable[$attribute['uuid']];
if (!empty($attribute['Sighting'])) {
$this->Sighting->captureSightings($attribute['Sighting'], $this->id, $eventId, $user);
$this->Sighting->captureSightings($attribute['Sighting'], $attributeId, $eventId, $user);
}
if ($user['Role']['perm_tagger']) {
/*

View File

@ -152,7 +152,7 @@ class Sighting extends AppModel
$toSave = [];
foreach ($sightings as $sighting) {
if (isset($existingSighting[$sighting['uuid']])) {
if (!empty($sighting['uuid']) && isset($existingSighting[$sighting['uuid']])) {
continue; // already exists, skip
}