From 1f0bae4d70f09f649526c107c9b71400c8307cc8 Mon Sep 17 00:00:00 2001 From: anishfyle Date: Wed, 20 Nov 2024 13:02:15 +0530 Subject: [PATCH 1/3] fix: fix posted at null --- apps/fyle/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/fyle/models.py b/apps/fyle/models.py index 7d69499e..c8db0f8b 100644 --- a/apps/fyle/models.py +++ b/apps/fyle/models.py @@ -207,6 +207,7 @@ def create_expense_objects(expenses: List[Dict], workspace_id: int, skip_update: "file_ids": expense["file_ids"], "spent_at": expense["spent_at"], "posted_at": expense["posted_at"], + "is_posted_at_null": expense["is_posted_at_null"], "fund_source": SOURCE_ACCOUNT_MAP[ expense["source_account_type"] ], From 4ddea93b62fcf6c03e7ed8d1bfcc7dfa612a57ab Mon Sep 17 00:00:00 2001 From: anishfyle Date: Wed, 20 Nov 2024 13:35:35 +0530 Subject: [PATCH 2/3] fixtures --- .../sql_fixtures/reset_db_fixtures/reset_db.sql | 4 ++-- tests/test_fyle/fixtures.py | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/sql_fixtures/reset_db_fixtures/reset_db.sql b/tests/sql_fixtures/reset_db_fixtures/reset_db.sql index f3a95cd5..0193f29b 100644 --- a/tests/sql_fixtures/reset_db_fixtures/reset_db.sql +++ b/tests/sql_fixtures/reset_db_fixtures/reset_db.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 15.7 (Debian 15.7-1.pgdg120+1) --- Dumped by pg_dump version 15.9 (Debian 15.9-1.pgdg120+1) +-- Dumped from database version 15.9 (Debian 15.9-1.pgdg120+1) +-- Dumped by pg_dump version 15.8 (Debian 15.8-1.pgdg120+1) SET statement_timeout = 0; SET lock_timeout = 0; diff --git a/tests/test_fyle/fixtures.py b/tests/test_fyle/fixtures.py index 158e5e3c..b4d47aa7 100644 --- a/tests/test_fyle/fixtures.py +++ b/tests/test_fyle/fixtures.py @@ -280,6 +280,7 @@ "Fyle Categories": "", }, "bank_transaction_id": None, + "is_posted_at_null": False }, ], @@ -326,7 +327,8 @@ "previous_export_state": None, "workspace_id": 399, "source_account_type": "PERSONAL_CORPORATE_CREDIT_CARD_ACCOUNT", - "bank_transaction_id": "btxnQe02cfpD9n" + "bank_transaction_id": "btxnQe02cfpD9n", + "is_posted_at_null": False }, { "id": 15134, @@ -370,7 +372,8 @@ "previous_export_state": None, "workspace_id": 399, "source_account_type": "PERSONAL_CORPORATE_CREDIT_CARD_ACCOUNT", - "bank_transaction_id": "btxnQe02cfpD9n" + "bank_transaction_id": "btxnQe02cfpD9n", + "is_posted_at_null": False }, { "id": 15135, @@ -414,7 +417,8 @@ "previous_export_state": None, "workspace_id": 399, "source_account_type": "PERSONAL_CORPORATE_CREDIT_CARD_ACCOUNT", - "bank_transaction_id": "btxnQe02cfpD9n" + "bank_transaction_id": "btxnQe02cfpD9n", + "is_posted_at_null": False }, { "id": 15136, @@ -458,7 +462,8 @@ "previous_export_state": None, "workspace_id": 399, "source_account_type": "PERSONAL_CORPORATE_CREDIT_CARD_ACCOUNT", - "bank_transaction_id": "btxnQe02cfpD9n" + "bank_transaction_id": "btxnQe02cfpD9n", + "is_posted_at_null": False }, ], @@ -503,6 +508,7 @@ "Fyle Categories": "", }, "bank_transaction_id": None, + "is_posted_at_null": False } ], "expense_group_id": { @@ -711,6 +717,7 @@ "paid_on_xero": False, "tax_amount": "None", "tax_group_id": "None", + "is_posted_at_null": False } ], "fund_source": "PERSONAL", @@ -780,6 +787,7 @@ "tax_amount": "None", "tax_group_id": "None", "bank_transaction_id": None, + "is_posted_at_null": False } ], "fund_source": "PERSONAL", From 5c1306059b8648fe13c6a0677f2fb48b2fd14d80 Mon Sep 17 00:00:00 2001 From: anishfyle Date: Wed, 20 Nov 2024 13:48:49 +0530 Subject: [PATCH 3/3] fixtures --- tests/test_workspaces/fixtures.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_workspaces/fixtures.py b/tests/test_workspaces/fixtures.py index 3d58f13e..3fad6c7d 100644 --- a/tests/test_workspaces/fixtures.py +++ b/tests/test_workspaces/fixtures.py @@ -97,6 +97,7 @@ "paid_on_qbo": False, "payment_number": "P/2022/05/R/7", "bank_transaction_id": None, + "is_posted_at_null": False } ], "workspace_schedule": {