diff --git a/github_publisher.py b/github_publisher.py index 9fcba30..5d9962d 100644 --- a/github_publisher.py +++ b/github_publisher.py @@ -458,8 +458,9 @@ def find_external_collection(self, collection: guru.Collection): response = self.get_repository_content(expected_path) if response.ok: - external_id = self.generate_external_id(collection.id, response.json()) - + external_id = self.get_metadata(collection.id)[ + "external_id" + ] or self.generate_external_id(collection.id, response.json()) return external_id def create_external_collection(self, collection: guru.Collection): @@ -540,7 +541,9 @@ def find_external_folder(self, folder: guru.Folder): response = self.get_repository_content(expected_path) if response.ok: - external_id = self.generate_external_id(folder.id, response.json()) + external_id = self.get_metadata(folder.id)[ + "external_id" + ] or self.generate_external_id(folder.id, response.json()) return external_id def create_external_folder(self, folder: guru.Folder, collection: guru.Collection): @@ -626,7 +629,9 @@ def find_external_card(self, card): response = self.get_repository_content(expected_path) if response.ok: - external_id = self.generate_external_id(card.id, response.json()) + external_id = self.get_metadata(card.id)[ + "external_id" + ] or self.generate_external_id(card.id, response.json()) return external_id def convert_card_content(self, card: guru.Card):