Skip to content

Commit

Permalink
fix hfd service
Browse files Browse the repository at this point in the history
  • Loading branch information
temaotl committed Aug 26, 2024
1 parent 1184396 commit 31024e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions app/Jobs/FolderAddMembership.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use App\Models\Entity;
use App\Models\Federation;
use App\Models\Membership;
use App\Notifications\EntityAddedToHfd;
use App\Notifications\MembershipAccepted;
use App\Services\FederationService;
use App\Services\NotificationService;
Expand All @@ -17,7 +16,6 @@
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
use Mockery\Exception;

class FolderAddMembership implements ShouldQueue
Expand All @@ -40,7 +38,6 @@ public function __construct(Membership $membership)
*/
public function handle(): void
{
Log::info('MEMBERSHIP START');
$federation = Federation::find($this->membership->federation_id);
$entity = Entity::find($this->membership->entity_id);

Expand All @@ -61,10 +58,6 @@ public function handle(): void

NotificationService::sendModelNotification($entity, new MembershipAccepted($this->membership));

/* if($this->membership->entity->hfd) {
NotificationService::sendEntityNotification($entity, new EntityAddedToHfd($this->membership->entity));
}*/

RunMdaScript::dispatch($federation, $lock->owner());
} catch (Exception $e) {
$this->fail($e);
Expand Down
2 changes: 1 addition & 1 deletion app/Services/HfdTagService.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function update(Entity $entity): false|string
if ($entity->hfd) {

if (! $this->hasTagInDocument($entity->xml_file, $this->value)) {
return $this->create($entity->xml_file);
return $this->create($entity);
}

} else {
Expand Down

0 comments on commit 31024e4

Please sign in to comment.