0.25, fix gitignore and attempt to preserve fields like description
CICD / Explore-Gitea-Actions (push) Successful in 34s Details

This commit is contained in:
Isaac Johnson 2025-10-14 12:23:27 -05:00
parent b3548ea49d
commit 0927000853
4 changed files with 12 additions and 6 deletions

1
.gitignore vendored
View File

@ -189,3 +189,4 @@ poetry.toml
pyrightconfig.json
# End of https://www.toptal.com/developers/gitignore/api/python,linux
.continue/

View File

@ -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

View File

@ -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",

11
main.py
View File

@ -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):