organizations-local 0.0.29__py3-none-any.whl → 0.0.31__py3-none-any.whl
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/organizations_local.py +21 -4
- {organizations_local-0.0.29.dist-info → organizations_local-0.0.31.dist-info}/METADATA +1 -1
- organizations_local-0.0.31.dist-info/RECORD +7 -0
- organizations_local-0.0.29.dist-info/RECORD +0 -7
- {organizations_local-0.0.29.dist-info → organizations_local-0.0.31.dist-info}/WHEEL +0 -0
- {organizations_local-0.0.29.dist-info → organizations_local-0.0.31.dist-info}/top_level.txt +0 -0
|
@@ -167,6 +167,7 @@ class OrganizationsLocal(GenericCRUDML, metaclass=MetaLogger,
|
|
|
167
167
|
|
|
168
168
|
return organizations_names_list
|
|
169
169
|
|
|
170
|
+
# Edited by Tal Goodman on 12.7.24
|
|
170
171
|
def get_organizations_ids_and_names_list_by_organizations_ids(
|
|
171
172
|
self, *, organizations_ids_list: list[int], lang_codes_list: list[LangCode] = None,
|
|
172
173
|
view_table_name: str = None) -> list[tuple[int, str]]:
|
|
@@ -198,18 +199,34 @@ class OrganizationsLocal(GenericCRUDML, metaclass=MetaLogger,
|
|
|
198
199
|
return test_organization_id
|
|
199
200
|
|
|
200
201
|
# If we add the support of multiple organizations per contact, We will have to fix this method
|
|
202
|
+
# Edited by Tal Goodman on 12.7.24
|
|
201
203
|
def get_update_status_and_information_list(self, *, last_modified_timestamp: str, main_profile_id: int) -> list[dict]:
|
|
202
204
|
if main_profile_id is None:
|
|
203
205
|
return UpdateStatus.UPDATE_CIRCLEZ
|
|
204
206
|
sync_conflict_resolution = SyncConflictResolution()
|
|
207
|
+
# TODO: Shall we also check update_timestamp in organization_table to see if the name was changed?
|
|
205
208
|
update_status_and_information_list: list[dict] = sync_conflict_resolution.get_update_status_and_information_list_by_where(
|
|
206
|
-
schema_name=
|
|
209
|
+
schema_name="organization_profile", view_table_name="organization_profile_view",
|
|
207
210
|
where="profile_id = %s", params=(main_profile_id,), local_last_modified_column_name="updated_timestamp",
|
|
208
211
|
remote_last_modified_timestamp=last_modified_timestamp)
|
|
209
212
|
# Add organization_names to update_status_and_information_list
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
+
organizations_ids_list = []
|
|
214
|
+
for update_status_and_information in update_status_and_information_list:
|
|
215
|
+
organization_id = update_status_and_information.get("organization_id")
|
|
216
|
+
if organization_id is not None:
|
|
217
|
+
organizations_ids_list.append(organization_id)
|
|
218
|
+
|
|
219
|
+
organizations_ids_and_names_list = self.get_organizations_ids_and_names_list_by_organizations_ids(
|
|
220
|
+
organizations_ids_list=organizations_ids_list,
|
|
221
|
+
view_table_name="organization_ml_view")
|
|
222
|
+
|
|
223
|
+
# Convert organizations_ids_and_names_list to a dictionary
|
|
224
|
+
organizations_ids_and_names_dict = {item["organization_id"]: item["title"] for item in organizations_ids_and_names_list}
|
|
225
|
+
|
|
226
|
+
for update_status_and_information in update_status_and_information_list:
|
|
227
|
+
organization_id = update_status_and_information.get("organization_id")
|
|
228
|
+
if organization_id is not None:
|
|
229
|
+
update_status_and_information["organization_name"] = organizations_ids_and_names_dict.get(organization_id)
|
|
213
230
|
|
|
214
231
|
return update_status_and_information_list
|
|
215
232
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
organizations_local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
organizations_local/organizations_constants.py,sha256=pxyAMmv4BFCfzyDsF92vImLdazA7_0ecKyVmOR9peEE,900
|
|
3
|
+
organizations_local/organizations_local.py,sha256=Tk84sAUu2N8IA40OkRIjMbFudMR6JvJwQbyKsdKzmV4,13121
|
|
4
|
+
organizations_local-0.0.31.dist-info/METADATA,sha256=dYHdFkJr5b3AcU9rTSjZv4Q8YndPR7sQcXFhlRcl7Sc,654
|
|
5
|
+
organizations_local-0.0.31.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
|
6
|
+
organizations_local-0.0.31.dist-info/top_level.txt,sha256=Y8wRcm3jFTyMdysBub_P8iqX1VOMS0ohUxA1GQdngFU,20
|
|
7
|
+
organizations_local-0.0.31.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
organizations_local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
organizations_local/organizations_constants.py,sha256=pxyAMmv4BFCfzyDsF92vImLdazA7_0ecKyVmOR9peEE,900
|
|
3
|
-
organizations_local/organizations_local.py,sha256=3gRpq7EGHNw5xhPAtImNYDf6JZoqjPK8WIvbdKU054o,12177
|
|
4
|
-
organizations_local-0.0.29.dist-info/METADATA,sha256=s-hTqXzpdCIHh6-0F18aaZa_Ysro51JLxnQj7r92m8c,654
|
|
5
|
-
organizations_local-0.0.29.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
|
6
|
-
organizations_local-0.0.29.dist-info/top_level.txt,sha256=Y8wRcm3jFTyMdysBub_P8iqX1VOMS0ohUxA1GQdngFU,20
|
|
7
|
-
organizations_local-0.0.29.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|