Skip to content

Commit 31551fe

Browse files
authored
Merge pull request #7012 from hotosm/staging
Hotfix for #7009
2 parents c850fdb + 9457408 commit 31551fe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

backend/models/postgis/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ async def reset_task(task_id: int, project_id: int, user_id: int, db: Database):
10951095
# Log the state change in the task history
10961096
await Task.set_task_history(
10971097
task_id=task_id,
1098-
project_id=None, # Assuming project_id is not needed here or is passed earlier
1098+
project_id=project_id,
10991099
user_id=user_id,
11001100
action=TaskAction.STATE_CHANGE,
11011101
db=db,

tests/api/unit/services/test_project_admin_service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ async def test_reset_all_tasks(self):
159159
)
160160
assert task.task_status == TaskStatus.READY.value
161161
if task_history:
162-
assert task_history[0].action_text == "Task reset"
162+
assert task_history[0].action_text == TaskStatus.READY.name
163+
assert task_history[1].action_text == "Task reset"
163164
query = """
164165
SELECT id, tasks_mapped, tasks_validated
165166
FROM projects

0 commit comments

Comments
 (0)