diff --git a/.gitignore b/.gitignore index 600a4e9..36acf96 100644 --- a/.gitignore +++ b/.gitignore @@ -189,3 +189,4 @@ poetry.toml pyrightconfig.json # End of https://www.toptal.com/developers/gitignore/api/python,linux +.continue/ diff --git a/Dockerfile b/Dockerfile index bb01760..377ee71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,4 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD ["python", "main.py"] -#harbor.freshbrewed.science/library/vikunjamcp:0.24 +#harbor.freshbrewed.science/library/vikunjamcp:0.25 diff --git a/gemini-extension.json b/gemini-extension.json index 4b68893..e4f80d2 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "vikunja", - "version": "1.0.24", + "version": "1.0.25", "mcpServers": { "nodeServer": { "command": "docker", @@ -14,7 +14,7 @@ "VIKUNJA_USERNAME", "-e", "VIKUNJA_PASSWORD", - "harbor.freshbrewed.science/library/vikunjamcp:0.24" + "harbor.freshbrewed.science/library/vikunjamcp:0.25" ], "env": { "VIKUNJA_URL": "$VIKUNJA_URL", diff --git a/main.py b/main.py index 7a4901b..9d9ae65 100644 --- a/main.py +++ b/main.py @@ -556,10 +556,15 @@ def update_task_details( if "Authorization" not in session.headers: return "Please run the 'login' command first." - payload = {} + try: + # First, fetch the existing task to get all its properties + response = session.get(f"{VIKUNJA_URL}/api/v1/tasks/{task_id}") + response.raise_for_status() + payload = response.json() + except requests.exceptions.RequestException as e: + logger.exception("update_task_details: failed to fetch existing task id=%s", task_id) + return f"Error fetching task details before update: {e}" - # at the least, id - payload["id"] = task_id # Simple helper to set only when value explicitly passed (not None) def set_if(provided, key, transform=lambda x: x):