Skip to content

Commit

Permalink
Issue GetDKAN#3839: Disentangle harvest register and revert - review …
Browse files Browse the repository at this point in the history
…feedback
  • Loading branch information
stefan-korn committed Sep 26, 2023
1 parent f43da06 commit cb1af2a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions modules/harvest/src/Commands/HarvestCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,12 @@ protected function buildPlanFromOpts($opts) {
*/
public function deregister($id) {
$message = 'Could not deregister the ' . $id . ' harvest.';
$this->logger->warning('If you deregister a harvest with published datasets, you will not be able to bulk revert the datasets connected to this harvest.');
$this->logger->warning(
'If you deregister a harvest with published datasets, you will
not be able to bulk revert the datasets connected to this harvest.');
if ($this->io()->confirm("Deregister harvest {$id}")) {
try {
if ($this->harvestService->deregisterHarvest($id)) {
$message = 'Successfully deregistered the ' . $id . ' harvest.';
}
}
catch (\Exception $e) {
$message = $e->getMessage();
if ($this->harvestService->deregisterHarvest($id)) {
$message = 'Successfully deregistered the ' . $id . ' harvest.';
}
}
else {
Expand Down

0 comments on commit cb1af2a

Please sign in to comment.