alchemy functions updated

This commit is contained in:
2024-11-10 13:16:45 +03:00
parent 7a7241c71c
commit eb947ecb3d
10 changed files with 140 additions and 92 deletions

View File

@@ -180,9 +180,9 @@ def create_application_defaults():
Duties.init_a_company_default_duties(
company_id=company_management.id, company_uu_id=str(company_management.uu_id)
)
bulk_duty = Duty.find_one(
bulk_duty = Duty.filter_by_one(
duty_code="BULK",
)
).data
RelationshipDutyCompany.find_or_create(
duties_id=bulk_duty.id,
@@ -195,14 +195,13 @@ def create_application_defaults():
is_notification_send=True,
)
it_dept = Departments.find_one(
it_dept = Departments.filter_by_one(
department_name="IT Department",
department_code="ITD001",
company_id=company_management.id,
company_uu_id=str(company_management.uu_id),
**dict(
is_confirmed=True, active=True, deleted=False, is_notification_send=True
),
**Departments.valid_record_dict,
is_confirmed=True,
)
Duty.find_or_create(