ado-asana-sync 1.23.7__py3-none-any.whl → 1.24.0__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.
- ado_asana_sync/database/database.py +14 -0
- {ado_asana_sync-1.23.7.dist-info → ado_asana_sync-1.24.0.dist-info}/METADATA +1 -1
- {ado_asana_sync-1.23.7.dist-info → ado_asana_sync-1.24.0.dist-info}/RECORD +6 -6
- {ado_asana_sync-1.23.7.dist-info → ado_asana_sync-1.24.0.dist-info}/WHEEL +0 -0
- {ado_asana_sync-1.23.7.dist-info → ado_asana_sync-1.24.0.dist-info}/entry_points.txt +0 -0
- {ado_asana_sync-1.23.7.dist-info → ado_asana_sync-1.24.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -410,6 +410,20 @@ class Database:
|
|
|
410
410
|
|
|
411
411
|
def sync_projects_from_json(self, projects_data: List[Dict[str, str]]) -> None:
|
|
412
412
|
"""Sync projects from JSON data into the projects table."""
|
|
413
|
+
# Check for duplicates before DB operations to provide better error messages
|
|
414
|
+
seen = set()
|
|
415
|
+
duplicates = []
|
|
416
|
+
for project in projects_data:
|
|
417
|
+
key = (project["adoProjectName"], project["adoTeamName"])
|
|
418
|
+
if key in seen:
|
|
419
|
+
duplicates.append(f"{project['adoProjectName']} (Team: {project['adoTeamName']})")
|
|
420
|
+
seen.add(key)
|
|
421
|
+
|
|
422
|
+
if duplicates:
|
|
423
|
+
error_msg = f"Duplicate project configuration found in projects.json for: {', '.join(duplicates)}"
|
|
424
|
+
_LOGGER.error(error_msg)
|
|
425
|
+
raise ValueError(error_msg)
|
|
426
|
+
|
|
413
427
|
with self.get_connection() as conn:
|
|
414
428
|
# Clear existing projects
|
|
415
429
|
conn.execute("DELETE FROM projects")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
ado_asana_sync/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
ado_asana_sync/database/__init__.py,sha256=ANZu6p6Ldoq7q3eJHA6wElAxCJTF98QIpm_Gbd1JlNM,290
|
|
3
|
-
ado_asana_sync/database/database.py,sha256=
|
|
3
|
+
ado_asana_sync/database/database.py,sha256=FCOFgw80QvOGnYCu0q8Z79etFLjE9ygTCCn6a13arsI,21513
|
|
4
4
|
ado_asana_sync/sync/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
ado_asana_sync/sync/__main__.py,sha256=qFrOftIsf4MwXoS3LVLJtnFOD-7x82u4fdA76WPnMf8,1464
|
|
6
6
|
ado_asana_sync/sync/app.py,sha256=ePVGOWl65W68kiQyucU8GrZcnuqtXaubsurgcnG1K0s,10796
|
|
@@ -14,8 +14,8 @@ ado_asana_sync/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
|
14
14
|
ado_asana_sync/utils/date.py,sha256=SofypF0YMTx0dVDo3a4KR-A9bmJtAo9s5_6Y18egFO0,760
|
|
15
15
|
ado_asana_sync/utils/logging_tracing.py,sha256=IOyvYGfLKinessNUoxmKDeOtu949kshfd0e_J6xGg8k,1444
|
|
16
16
|
ado_asana_sync/utils/utils.py,sha256=E-BhHgnI3Xu9W041jZ9ocCO7HxdSUW0vuhhrUOt8R50,670
|
|
17
|
-
ado_asana_sync-1.
|
|
18
|
-
ado_asana_sync-1.
|
|
19
|
-
ado_asana_sync-1.
|
|
20
|
-
ado_asana_sync-1.
|
|
21
|
-
ado_asana_sync-1.
|
|
17
|
+
ado_asana_sync-1.24.0.dist-info/METADATA,sha256=02Y3byy3abz2qoWVbyLmxcS5sBiQpW81xliHHGLttnU,7185
|
|
18
|
+
ado_asana_sync-1.24.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
19
|
+
ado_asana_sync-1.24.0.dist-info/entry_points.txt,sha256=0EkEBqNyKq3OfQ8epfpGsZw-OC9FF_hEmXm90cFpCvI,280
|
|
20
|
+
ado_asana_sync-1.24.0.dist-info/licenses/LICENSE,sha256=zviG-ql08liZUu3uFb9lZz7e4QxxMfCKRlci_Wexi-U,1088
|
|
21
|
+
ado_asana_sync-1.24.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|