0.22 - would not update lables if no other fields, allow update labels only
CICD / Explore-Gitea-Actions (push) Successful in 36s
Details
CICD / Explore-Gitea-Actions (push) Successful in 36s
Details
This commit is contained in:
parent
572cc4dd3c
commit
c49ba8ff8d
|
@ -20,4 +20,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
CMD ["python", "main.py"]
|
CMD ["python", "main.py"]
|
||||||
#harbor.freshbrewed.science/library/vikunjamcp:0.21
|
#harbor.freshbrewed.science/library/vikunjamcp:0.22
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "vikunja",
|
"name": "vikunja",
|
||||||
"version": "1.0.21",
|
"version": "1.0.22",
|
||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
"nodeServer": {
|
"nodeServer": {
|
||||||
"command": "docker",
|
"command": "docker",
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"VIKUNJA_USERNAME",
|
"VIKUNJA_USERNAME",
|
||||||
"-e",
|
"-e",
|
||||||
"VIKUNJA_PASSWORD",
|
"VIKUNJA_PASSWORD",
|
||||||
"harbor.freshbrewed.science/library/vikunjamcp:0.21"
|
"harbor.freshbrewed.science/library/vikunjamcp:0.22"
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"VIKUNJA_URL": "$VIKUNJA_URL",
|
"VIKUNJA_URL": "$VIKUNJA_URL",
|
||||||
|
|
6
main.py
6
main.py
|
@ -558,6 +558,9 @@ def update_task_details(
|
||||||
|
|
||||||
payload = {}
|
payload = {}
|
||||||
|
|
||||||
|
# at the least, id
|
||||||
|
payload["id"] = task_id
|
||||||
|
|
||||||
# Simple helper to set only when value explicitly passed (not None)
|
# Simple helper to set only when value explicitly passed (not None)
|
||||||
def set_if(provided, key, transform=lambda x: x):
|
def set_if(provided, key, transform=lambda x: x):
|
||||||
if provided is not None:
|
if provided is not None:
|
||||||
|
@ -617,9 +620,6 @@ def update_task_details(
|
||||||
else:
|
else:
|
||||||
labels_payload = {"labels": [str(labels)]}
|
labels_payload = {"labels": [str(labels)]}
|
||||||
|
|
||||||
if not payload:
|
|
||||||
return "No fields provided to update."
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
logger.info("update_task_details: updating task_id=%s with payload keys=%s", task_id, list(payload.keys()))
|
logger.info("update_task_details: updating task_id=%s with payload keys=%s", task_id, list(payload.keys()))
|
||||||
response = session.post(f"{VIKUNJA_URL}/api/v1/tasks/{task_id}", json=payload)
|
response = session.post(f"{VIKUNJA_URL}/api/v1/tasks/{task_id}", json=payload)
|
||||||
|
|
Loading…
Reference in New Issue