Skip to content

Commit 02f5157

Browse files
committed
fix: do not error if missing fields
The lib was validating the fields in the databag, causing any differences in versions between the provider/requirer libs to throw an exception
1 parent d0269b8 commit 02f5157

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

lib/charms/identity_platform_login_ui_operator/v0/login_ui_endpoints.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def some_event_function():
5252

5353
# Increment this PATCH version before using `charmcraft publish-lib` or reset
5454
# to 0 if you are raising the major API version
55-
LIBPATCH = 1
55+
LIBPATCH = 2
5656

5757
RELATION_NAME = "ui-endpoint-info"
5858
INTERFACE_NAME = "login_ui_endpoints"
@@ -155,14 +155,6 @@ def __init__(self) -> None:
155155
super().__init__(self.message)
156156

157157

158-
class LoginUIEndpointsRelationDataMissingError(LoginUIEndpointsRelationError):
159-
"""Raised when information is missing from the relation."""
160-
161-
def __init__(self, message: str) -> None:
162-
self.message = message
163-
super().__init__(self.message)
164-
165-
166158
class LoginUIEndpointsRequirer(Object):
167159
"""Requirer side of the ui-endpoint-info relation."""
168160

@@ -187,9 +179,4 @@ def get_login_ui_endpoints(self, relation_id=None) -> Dict:
187179

188180
ui_endpoint_relation_data = ui_endpoint_relation.data[ui_endpoint_relation.app]
189181

190-
if any(not ui_endpoint_relation_data.get(k := key) for key in RELATION_KEYS):
191-
raise LoginUIEndpointsRelationDataMissingError(
192-
f"Missing endpoint {k} in ui-endpoint-info relation data"
193-
)
194-
195182
return ui_endpoint_relation_data

0 commit comments

Comments
 (0)