|
12 | 12 | from citrine._serialization import properties |
13 | 13 | from citrine._session import Session |
14 | 14 | from citrine._utils.functions import format_escaped_url |
15 | | -from citrine.exceptions import NonRetryableException, ModuleRegistrationFailedException |
16 | 15 | from citrine.resources.api_error import ApiError |
17 | 16 | from citrine.resources.branch import BranchCollection |
18 | 17 | from citrine.resources.dataset import DatasetCollection |
@@ -592,12 +591,7 @@ def register(self, name: str, *, description: Optional[str] = None) -> Project: |
592 | 591 | "Use team.projects.register.") |
593 | 592 |
|
594 | 593 | project = Project(name, description=description) |
595 | | - try: |
596 | | - data = self.session.post_resource(self._get_path(), project.dump()) |
597 | | - data = data[self._individual_key] |
598 | | - return self.build(data) |
599 | | - except NonRetryableException as e: |
600 | | - raise ModuleRegistrationFailedException(project.__class__.__name__, e) |
| 594 | + return super().register(project) |
601 | 595 |
|
602 | 596 | def list(self, *, per_page: int = 1000) -> Iterator[Project]: |
603 | 597 | """ |
@@ -741,7 +735,7 @@ def delete(self, uid: Union[UUID, str]) -> Response: |
741 | 735 | If the project is not empty, then the Response will contain a list of all of the project's |
742 | 736 | resources. These must be deleted before the project can be deleted. |
743 | 737 | """ |
744 | | - # Only the team-agnostic project get is implemented |
| 738 | + # Only the team-agnostic project delete is implemented |
745 | 739 | if self.team_id is None: |
746 | 740 | return super().delete(uid) |
747 | 741 | else: |
|
0 commit comments