Skip to content
Snippets Groups Projects
Commit b87bf175 authored by Ethan David Hale's avatar Ethan David Hale
Browse files

fix: Fixed confirmation request to only appear if using the CLI.

parent 1033be66
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,7 @@ from uppaal2jetracer.parser.parser import SystemParser, XMLParseError
from uppaal2jetracer.uppaalmodel.system import System
from uppaal2jetracer.versioncontrol.versioncontrol import VersionManager, ProjectManager, \
ResponseObject, ProjectResponse, ResponseType, VersionResponse, GlobalResponse
from uppaal2jetracer.cli import CLI
logger = logging.getLogger("user_command")
......@@ -709,7 +710,8 @@ Options: -d, --debug Log debug messages.
if not len(args) == 1:
return CommandResult(self._ERROR_ARG_COUNT, CommandResultType.FAILURE)
try:
if (self._version_manager.get_version(int(args[0])).payload.favorite
if (isinstance(self, CLI)
and self._version_manager.get_version(int(args[0])).payload.favorite
and not self._command_handler.get_confirmation(
self._DELETE_CONFIRMATION_REQUEST)):
return CommandResult(self._ABORT_DELETE, CommandResultType.SUCCESS, None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment