From f4fd6bd80763f7f5769d45de40d481ce05b2a5be Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 6 May 2024 16:02:37 -0700 Subject: [PATCH] Refactor to resolve reference error https://github.com/NeonGeckoCom/NeonCore/actions/runs/8976886241/job/24654634811?pr=641 --- ovos_workshop/skills/ovos.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ovos_workshop/skills/ovos.py b/ovos_workshop/skills/ovos.py index cac34922..363b719b 100644 --- a/ovos_workshop/skills/ovos.py +++ b/ovos_workshop/skills/ovos.py @@ -2435,13 +2435,12 @@ def disable_intent(self, intent_name: str) -> bool: """ if intent_name in self.intent_service: self.log.info('Disabling intent ' + intent_name) - name = f'{self.skill_id}:{intent_name}' - self.intent_service.detach_intent(name) + self.intent_service.remove_intent(intent_name) langs = [self.core_lang] + self.secondary_langs for lang in langs: - lang_intent_name = f'{name}_{lang}' - self.intent_service.detach_intent(lang_intent_name) + lang_intent_name = f'{intent_name}_{lang}' + self.intent_service.remove_intent(lang_intent_name) return True else: self.log.error(f'Could not disable {intent_name}, it hasn\'t been registered.')