contact-person-profile-csv-imp-local 0.0.38__py3-none-any.whl → 0.0.39__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.
@@ -173,7 +173,7 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
173
173
  # TODO Align the parameters between import-contact-csv with sync-google-contact
174
174
  # TODO Can we please add groups_str parameter to both sync-google-contact and import-contact-csv where we add all contacts to those groups?
175
175
  def insert_update_contact_from_csv(
176
- self, *, data_source_type_id: int, file_name: str = None, user_external_username: str, system_id: int = None,
176
+ self, *, username: str, email_address: str, data_source_type_id: int, file_name: str = None, system_id: int = None,
177
177
  # TODO Add support to criteria_set_id
178
178
  directory_name: str = None, csv_path: str = None, start_index: int = 0, end_index: int = None,
179
179
  groups_dicts: list[dict] = None, profile_id: int = None) -> dict:
@@ -196,7 +196,7 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
196
196
  profile_id_by_email_address = ProfilesLocal().select_one_value_by_column_and_value(
197
197
  schema_name="profile", view_table_name="profile_view",
198
198
  select_clause_value="profile_id", column_name="profile.main_email_address",
199
- column_value=user_external_username)
199
+ column_value=email_address)
200
200
  system_id = system_id or CONTACT_PERSON_PROFILE_CSV_SYSTEM_ID
201
201
  self.set_schema(schema_name="field")
202
202
  profile_id = profile_id or profile_id_by_email_address
@@ -229,13 +229,13 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
229
229
  'address1_country', 'address2_street', 'address2_city', 'address2_state', 'address2_postal_code',
230
230
  'address2_country', 'job_title', 'organization', 'display_as')
231
231
 
232
- user_external_id = self.__get_user_external_id(user_external_username=user_external_username,
232
+ user_external_id = self.__get_user_external_id(user_external_username=username,
233
233
  profile_id=profile_id, system_id=system_id)
234
234
  # We create a new data_source_instance_id everytime we import a new csv file
235
235
  data_source_instance_id = self.__get_data_source_instance_id(
236
236
  data_source_type_id=data_source_type_id, csv_file_path=csv_file_path,
237
237
  user_external_id=user_external_id, file_name=file_name,
238
- user_external_username=user_external_username,
238
+ user_external_username=username,
239
239
  start_index=start_index, end_index=end_index
240
240
  )
241
241
  fields_dictonary = self.data_sources.get_fields_name_from_csv(data_source_type_id)
@@ -509,8 +509,9 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
509
509
 
510
510
  def __insert_link_contact_groups(self, contact_dict: dict) -> list:
511
511
  contact_id = contact_dict.get("contact_id")
512
+ # TODO groups_dicts_list
512
513
  groups = []
513
- groups_linked = None
514
+ linked_groups_results_list = None
514
515
  organization = contact_dict.get("organization")
515
516
  if organization:
516
517
  organization_group_dict = {
@@ -538,14 +539,16 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
538
539
  }
539
540
  groups.append(job_title_group_dict)
540
541
  if contact_dict.get("groups"):
542
+ # TODO _contacts_groups_names_list?
541
543
  _groups = contact_dict.get("groups").split(", ")
542
544
  for group in _groups:
543
545
  group_dict = {
544
546
  # table:
545
- "name": group,
547
+ "name": group, # TODO We need to translate to English
546
548
  "hashtag": '#' + group.upper(),
547
549
  "main_group_type_id": self.unknown_main_group_type_id,
548
550
  # ml table:
551
+ # TODO What about the lang_code?
549
552
  "is_main_title": False,
550
553
  "title": group,
551
554
  }
@@ -553,10 +556,11 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
553
556
  for group in self.groups_list:
554
557
  groups.append(group)
555
558
  if len(groups) > 0:
556
- groups_linked = self.contact_groups.insert_link_contact_group_with_group_local(
559
+ linked_groups_results_list = self.contact_groups.insert_link_contact_group_with_group_local(
557
560
  contact_id=contact_id, groups_list_of_dicts=groups)
561
+ contact_dict["linked_group_results_list"] = linked_groups_results_list
558
562
 
559
- return groups_linked
563
+ return linked_groups_results_list
560
564
 
561
565
  def __insert_link_contact_persons(self, contact_dict: dict) -> dict:
562
566
  if not contact_dict.get("first_name") and not contact_dict.get("last_name"):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: contact-person-profile-csv-imp-local
3
- Version: 0.0.38
3
+ Version: 0.0.39
4
4
  Summary: PyPI Package for Circles CSVToContactPersonProfile-local Local/Remote Python
5
5
  Home-page: https://github.com/circles-zone/contact-person-profile-csv-imp-local-python-package
6
6
  Author: Circles
@@ -0,0 +1,7 @@
1
+ contact_person_profile_csv_imp_local/CSVToContactPersonProfile.py,sha256=XSwqB1laIT-XdA6CJJMadAiZYXGNWcEWm_B7y9SEJLU,50658
2
+ contact_person_profile_csv_imp_local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ contact_person_profile_csv_imp_local/contact_person_profile_csv_imp_local_constants.py,sha256=SsMFKnI7y3P_kQxH21rxKnX7H4MZlemBy5vuv_Ns_a4,1180
4
+ contact_person_profile_csv_imp_local-0.0.39.dist-info/METADATA,sha256=6F0QWD0J7pooK3YZUtLPqW5RWGkcLKauaq8uKZRPCJQ,1481
5
+ contact_person_profile_csv_imp_local-0.0.39.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
6
+ contact_person_profile_csv_imp_local-0.0.39.dist-info/top_level.txt,sha256=at6BnVzULDB109KZx9Cl9ClCHU4c0ykfV38WX-QR71U,37
7
+ contact_person_profile_csv_imp_local-0.0.39.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,7 +0,0 @@
1
- contact_person_profile_csv_imp_local/CSVToContactPersonProfile.py,sha256=P9xYZmLcAnTh6KTeV58mVfBNTe1ThzOXWEK_HpixCw4,50398
2
- contact_person_profile_csv_imp_local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- contact_person_profile_csv_imp_local/contact_person_profile_csv_imp_local_constants.py,sha256=SsMFKnI7y3P_kQxH21rxKnX7H4MZlemBy5vuv_Ns_a4,1180
4
- contact_person_profile_csv_imp_local-0.0.38.dist-info/METADATA,sha256=9llHwWVhEzxk4BoVIQ_GnnHcKQL6PMXmxvbnqGHzZPc,1481
5
- contact_person_profile_csv_imp_local-0.0.38.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
- contact_person_profile_csv_imp_local-0.0.38.dist-info/top_level.txt,sha256=at6BnVzULDB109KZx9Cl9ClCHU4c0ykfV38WX-QR71U,37
7
- contact_person_profile_csv_imp_local-0.0.38.dist-info/RECORD,,