diff --git a/apps/fyle/models.py b/apps/fyle/models.py index 3227c774..087ab4dd 100644 --- a/apps/fyle/models.py +++ b/apps/fyle/models.py @@ -176,6 +176,7 @@ def create_expense_objects(expenses: List[Dict], workspace_id, skip_update: bool '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']], 'verified_at': expense['verified_at'], 'custom_properties': expense['custom_properties'], diff --git a/tests/sql_fixtures/reset_db_fixtures/reset_db.sql b/tests/sql_fixtures/reset_db_fixtures/reset_db.sql index 285dd66b..9f4b573e 100644 --- a/tests/sql_fixtures/reset_db_fixtures/reset_db.sql +++ b/tests/sql_fixtures/reset_db_fixtures/reset_db.sql @@ -11903,7 +11903,6 @@ SELECT pg_catalog.setval('public.django_content_type_id_seq', 47, true); -- Name: django_migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- -SELECT pg_catalog.setval('public.django_migrations_id_seq', 201, true); SELECT pg_catalog.setval('public.django_migrations_id_seq', 203, true); diff --git a/tests/test_fyle/fixtures.py b/tests/test_fyle/fixtures.py index 2fd00f08..d6bef867 100644 --- a/tests/test_fyle/fixtures.py +++ b/tests/test_fyle/fixtures.py @@ -280,6 +280,7 @@ 'Vehicle Type': '', 'Fyle Categories': '', }, + "is_posted_at_null": True }, { 'id': '1235', @@ -320,6 +321,7 @@ 'Vehicle Type': '', 'Fyle Categories': '', }, + "is_posted_at_null": True }, { 'id': '1236', @@ -360,6 +362,7 @@ 'Vehicle Type': '', 'Fyle Categories': '', }, + "is_posted_at_null": True }, ], "skipped_expenses":{ @@ -379,14 +382,16 @@ 'amount': 101.0, 'report_id': 'dummy_report_id', 'settlement_id': 'dummy_settlement_id', - 'expense_id': 'dummy_expense_id' + 'expense_id': 'dummy_expense_id', + "is_posted_at_null": True }, { 'updated_at': '2021-12-03T11:26:58.702209Z', 'claim_number': ' C/2021/12/R/199', 'employee_email': 'jhonsnow@fyle.in', 'employee_name': None, - 'fund_source': 'CCC' + 'fund_source': 'CCC', + "is_posted_at_null": True } ] }, @@ -608,6 +613,7 @@ 'Vehicle Type': '', 'Fyle Categories': '', }, + 'is_posted_at_null': True }, { 'id': 'tx6wOnBVaumklol', @@ -649,6 +655,7 @@ 'Vehicle Type': '', 'Fyle Categories': '', }, + 'is_posted_at_null': True }, ], "expenses": [ @@ -692,6 +699,7 @@ 'Vehicle Type': '', 'Fyle Categories': '', }, + "is_posted_at_null": True }, { 'id': 'tx6wOnBVaumk', @@ -733,6 +741,7 @@ 'Vehicle Type': '', 'Fyle Categories': '', }, + "is_posted_at_null": False }, ], "expense_group_expenses": [ @@ -807,7 +816,8 @@ "amount": 6377.0, "report_id": "rp0kaXoqkJle", "settlement_id": "setPzkM7eyQFd", - "expense_id": "txyZ1zJDQfiK" + "expense_id": "txyZ1zJDQfiK", + "is_posted_at_null": True }], }, "expense_group_setting_response": {