From fc521dac747e422a4ee321544a59b490da470f42 Mon Sep 17 00:00:00 2001 From: Sujan Adhikari Date: Mon, 23 Dec 2024 15:29:48 +0545 Subject: [PATCH 1/5] fix: add db parameter to split_by_square after recent changes to fmtm splitter --- src/backend/app/projects/project_routes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/app/projects/project_routes.py b/src/backend/app/projects/project_routes.py index 0f8e5032f..cd71f5fbe 100644 --- a/src/backend/app/projects/project_routes.py +++ b/src/backend/app/projects/project_routes.py @@ -619,8 +619,9 @@ async def preview_split_by_square( return split_by_square( boundary_featcol, - osm_extract=parsed_extract, + settings.FMTM_DB_URL.unicode_string(), meters=dimension_meters, + osm_extract=parsed_extract, ) From 8f00e4d5e2ffaec1ffb679c7ef3a599e0acf2db0 Mon Sep 17 00:00:00 2001 From: Sujan Adhikari Date: Mon, 23 Dec 2024 17:45:05 +0545 Subject: [PATCH 2/5] fix: remove public tag from odk_entities in sql --- src/backend/app/db/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/app/db/models.py b/src/backend/app/db/models.py index 212d475ee..08b277e66 100644 --- a/src/backend/app/db/models.py +++ b/src/backend/app/db/models.py @@ -1396,7 +1396,7 @@ async def upsert( ) sql = """ - INSERT INTO public.odk_entities + INSERT INTO odk_entities (entity_id, status, project_id, task_id) VALUES """ From 72ee9d4b6d4a2f11790d693c573f93561886065b Mon Sep 17 00:00:00 2001 From: Sujan Adhikari Date: Mon, 23 Dec 2024 17:54:40 +0545 Subject: [PATCH 3/5] fix: add username in task event test fixture --- src/backend/tests/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/tests/conftest.py b/src/backend/tests/conftest.py index 71866da53..7fd3283ad 100644 --- a/src/backend/tests/conftest.py +++ b/src/backend/tests/conftest.py @@ -230,6 +230,7 @@ async def task_event(db, project, tasks, admin_user): new_event = TaskEventIn( task_id=task.id, user_id=user.id, + username=user.username, event=TaskEvent.MAP, comment="We added a comment!", ) From 159c7713c8fc95197655ae97673f9107864c3713 Mon Sep 17 00:00:00 2001 From: Sujan Adhikari Date: Tue, 24 Dec 2024 11:08:57 +0545 Subject: [PATCH 4/5] fix: revert changes --- src/backend/app/db/models.py | 2 +- src/backend/tests/conftest.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/app/db/models.py b/src/backend/app/db/models.py index 08b277e66..212d475ee 100644 --- a/src/backend/app/db/models.py +++ b/src/backend/app/db/models.py @@ -1396,7 +1396,7 @@ async def upsert( ) sql = """ - INSERT INTO odk_entities + INSERT INTO public.odk_entities (entity_id, status, project_id, task_id) VALUES """ diff --git a/src/backend/tests/conftest.py b/src/backend/tests/conftest.py index 7fd3283ad..71866da53 100644 --- a/src/backend/tests/conftest.py +++ b/src/backend/tests/conftest.py @@ -230,7 +230,6 @@ async def task_event(db, project, tasks, admin_user): new_event = TaskEventIn( task_id=task.id, user_id=user.id, - username=user.username, event=TaskEvent.MAP, comment="We added a comment!", ) From 5812f111b26111951a7418b1e48569d69d66ca39 Mon Sep 17 00:00:00 2001 From: Sujan Adhikari Date: Tue, 24 Dec 2024 15:25:31 +0545 Subject: [PATCH 5/5] fix: skip scan image from workflow file --- .github/workflows/build_and_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index ed5e161e6..568615fc6 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -39,6 +39,7 @@ jobs: with: context: src/backend build_target: prod + scan_image: False image_name: ghcr.io/${{ github.repository }}/backend frontend-build: