organizations-local 0.0.14__tar.gz → 0.0.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {organizations_local-0.0.14 → organizations_local-0.0.16}/PKG-INFO +1 -1
- {organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local/src/organizations_local.py +14 -14
- {organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local.egg-info/PKG-INFO +1 -1
- {organizations_local-0.0.14 → organizations_local-0.0.16}/pyproject.toml +1 -1
- {organizations_local-0.0.14 → organizations_local-0.0.16}/setup.py +1 -1
- {organizations_local-0.0.14 → organizations_local-0.0.16}/README.md +0 -0
- {organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local/src/__init__.py +0 -0
- {organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local/src/organizations_constants.py +0 -0
- {organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local.egg-info/SOURCES.txt +0 -0
- {organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local.egg-info/dependency_links.txt +0 -0
- {organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local.egg-info/requires.txt +0 -0
- {organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local.egg-info/top_level.txt +0 -0
- {organizations_local-0.0.14 → organizations_local-0.0.16}/setup.cfg +0 -0
|
@@ -69,7 +69,7 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
69
69
|
|
|
70
70
|
def insert_organization(self, organization_dict: dict) -> tuple[int, int]:
|
|
71
71
|
logger.start(object={'data': str(organization_dict)})
|
|
72
|
-
|
|
72
|
+
organization_data_dict = {
|
|
73
73
|
"name": organization_dict.get('name'),
|
|
74
74
|
"is_approved": organization_dict.get('is_approved'),
|
|
75
75
|
"is_main": organization_dict.get('is_main'),
|
|
@@ -82,9 +82,9 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
82
82
|
"Non_members_visibility_profile_id": organization_dict.get('Non_members_visibility_profile_id'),
|
|
83
83
|
"main_group_id": organization_dict.get('main_group_id')
|
|
84
84
|
}
|
|
85
|
-
organization_id = GenericCRUDML.insert(self,
|
|
85
|
+
organization_id = GenericCRUDML.insert(self, data_dict=organization_data_dict)
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
organization_ml_data_dict = {
|
|
88
88
|
"organization_id": organization_id,
|
|
89
89
|
"lang_code": organization_dict.get('lang_code'),
|
|
90
90
|
"is_main": organization_dict.get('is_main'),
|
|
@@ -94,7 +94,7 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
94
94
|
"description": organization_dict.get('description')
|
|
95
95
|
}
|
|
96
96
|
organization_ml_id = GenericCRUDML.insert(self, table_name="organization_ml_table",
|
|
97
|
-
|
|
97
|
+
data_dict=organization_ml_data_dict)
|
|
98
98
|
|
|
99
99
|
logger.end(object={'organization_id': organization_id,
|
|
100
100
|
'organization_ml_id': organization_ml_id})
|
|
@@ -103,7 +103,7 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
103
103
|
def upsert_organization(self, organization_dict: dict, order_by: str = "") -> dict:
|
|
104
104
|
logger.start(object={'data': str(organization_dict)})
|
|
105
105
|
lang_code = LangCode.detect_lang_code(organization_dict.get('title'))
|
|
106
|
-
|
|
106
|
+
organization_data_dict = {
|
|
107
107
|
"name": organization_dict.get('name'),
|
|
108
108
|
"is_approved": organization_dict.get('is_approved'),
|
|
109
109
|
"is_main": organization_dict.get('is_main'),
|
|
@@ -117,7 +117,7 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
117
117
|
"main_group_id": organization_dict.get('main_group_id')
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
organization_ml_data_dict = {
|
|
121
121
|
"is_main": organization_dict.get('is_main'),
|
|
122
122
|
"title": organization_dict.get('title'),
|
|
123
123
|
"is_name_approved": organization_dict.get('is_name_approved'),
|
|
@@ -126,9 +126,9 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
126
126
|
}
|
|
127
127
|
if "(" and ")" in organization_dict.get('title'):
|
|
128
128
|
organization_id, organzation_ml_ids_list = GenericCRUDML.upsert_value_with_abbreviations(
|
|
129
|
-
self,
|
|
129
|
+
self, data_ml_dict=organization_ml_data_dict,
|
|
130
130
|
lang_code=lang_code,
|
|
131
|
-
|
|
131
|
+
data_dict=organization_data_dict,
|
|
132
132
|
schema_name=DEFAULT_SCHEMA_NAME,
|
|
133
133
|
table_name=DEFAULT_TABLE_NAME,
|
|
134
134
|
ml_table_name=DEFAULT_ML_TABLE_NAME,
|
|
@@ -136,9 +136,9 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
136
136
|
)
|
|
137
137
|
else:
|
|
138
138
|
organization_id, organzation_ml_id = GenericCRUDML.upsert_value(
|
|
139
|
-
self,
|
|
139
|
+
self, data_ml_dict=organization_ml_data_dict,
|
|
140
140
|
lang_code=lang_code,
|
|
141
|
-
|
|
141
|
+
data_dict=organization_data_dict,
|
|
142
142
|
schema_name=DEFAULT_SCHEMA_NAME,
|
|
143
143
|
table_name=DEFAULT_TABLE_NAME,
|
|
144
144
|
ml_table_name=DEFAULT_ML_TABLE_NAME,
|
|
@@ -156,7 +156,7 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
156
156
|
|
|
157
157
|
def update_organization(self, organization_id: int, organization_ml_id: int, organization_dict: dict) -> None:
|
|
158
158
|
logger.start(object={'organization_id': organization_id, 'data': str(organization_dict)})
|
|
159
|
-
|
|
159
|
+
organization_data_dict = {
|
|
160
160
|
"name": organization_dict.get('name'),
|
|
161
161
|
"is_approved": organization_dict.get('is_approved'),
|
|
162
162
|
"is_main": organization_dict.get('is_main'),
|
|
@@ -170,9 +170,9 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
170
170
|
"main_group_id": organization_dict.get('main_group_id')
|
|
171
171
|
}
|
|
172
172
|
GenericCRUDML.update_by_id(self, id_column_value=organization_id,
|
|
173
|
-
|
|
173
|
+
data_dict=organization_data_dict)
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
organization_ml_data_dict = {
|
|
176
176
|
"organization_id": organization_id,
|
|
177
177
|
"lang_code": organization_dict.get('lang_code'),
|
|
178
178
|
"is_main": organization_dict.get('is_main'),
|
|
@@ -182,7 +182,7 @@ class OrganizationsLocal(GenericCRUDML):
|
|
|
182
182
|
"description": organization_dict.get('description')
|
|
183
183
|
}
|
|
184
184
|
GenericCRUDML.update_by_id(self, table_name="organization_ml_table",
|
|
185
|
-
id_column_value=organization_ml_id,
|
|
185
|
+
id_column_value=organization_ml_id, data_dict=organization_ml_data_dict,
|
|
186
186
|
id_column_name="organization_ml_id")
|
|
187
187
|
logger.end()
|
|
188
188
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "organizations-local"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.15" # https://pypi.org/project/organizations-local
|
|
8
8
|
description = "organizations-local Python Package"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
@@ -5,7 +5,7 @@ package_dir = PACKAGE_NAME.replace("-", "_")
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name=PACKAGE_NAME,
|
|
8
|
-
version='0.0.
|
|
8
|
+
version='0.0.16', # update only the minor version each time # https://pypi.org/project/organizations-local/
|
|
9
9
|
author="Circles",
|
|
10
10
|
author_email="info@circlez.ai",
|
|
11
11
|
description="PyPI Package for Circles organizations-local Python",
|
|
File without changes
|
{organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local/src/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local.egg-info/requires.txt
RENAMED
|
File without changes
|
{organizations_local-0.0.14 → organizations_local-0.0.16}/organizations_local.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|