Skip to content

Commit 82c9669

Browse files
author
Matt Kafonek
authored
safeguard on rtu_client_type until Gate is updated (#149)
* safeguard on rtu_client_type until Gate is updated * changelog
1 parent e408ba2 commit 82c9669

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ For pre-1.0 releases, see [0.0.35 Changelog](https://github.com/noteable-io/orig
88

99
## [Unreleased]
1010

11+
### Changed
12+
- Temporary guard against invalid `rtu_client_type` names when initiating `APIClient`
13+
1114
## [1.0.0-alpha.3] - 2023-08-01
1215
### Added
1316
- `origami.models.notebook.make_sql_cell` convenience function, returns a `CodeCell` with appropriate metadata

origami/clients/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ def __init__(
4343
transport=transport,
4444
timeout=timeout,
4545
)
46-
46+
# Hack until Gate changes out rtu_client_type from enum to str
47+
if rtu_client_type not in ['origami', 'origamist', 'planar_ally', 'geas']:
48+
rtu_client_type = 'unknown'
4749
self.rtu_client_type = rtu_client_type # Only used when generating an RTUClient
4850

4951
def add_tags_and_contextvars(self, **tags):

0 commit comments

Comments
 (0)