Skip to content

Commit

Permalink
fix: save and exist changing the activity status
Browse files Browse the repository at this point in the history
  • Loading branch information
Momik Shrestha committed Jan 17, 2024
1 parent ee0613e commit 9ee5287
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion app/IATI/Services/Activity/ActivityIdentifierService.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ public function getActivityData($id): object
*/
public function update($id, $activityIdentifier): bool
{
return $this->activityRepository->update($id, ['iati_identifier' => $activityIdentifier]);
$isPublished = $this->activityRepository->find($id, ['linked_to_iati'])['linked_to_iati'];

if (!$isPublished) {
return $this->activityRepository->update($id, ['iati_identifier' => $activityIdentifier]);
}

return true;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"/manifest.js": "/manifest.js?id=3ed1124c8f4dcb98acc36de67cb80349",
"/css/webportal-app.css": "/css/webportal-app.css?id=0f009a4a7de2b47662e1372527997c94",
"/css/app.css": "/css/app.css?id=01794bf9a0ee83300c6ebc8403ce4f4e",
"/js/vendor.js": "/js/vendor.js?id=0942afd4254ae3ec9735bcd097e612eb"
"/js/vendor.js": "/js/vendor.js?id=ab39e8560c77a4ff552ac3dc5607a2d4"
}

0 comments on commit 9ee5287

Please sign in to comment.