@@ -309,7 +309,7 @@ def _on_resource_requested(self, event: ResourceRequestedEvent) -> None:
309309
310310# Increment this PATCH version before using `charmcraft publish-lib` or reset
311311# to 0 if you are raising the major API version
312- LIBPATCH = 0
312+ LIBPATCH = 1
313313
314314PYDEPS = ["ops>=2.0.0" , "pydantic>=2.11" ]
315315
@@ -728,7 +728,7 @@ def serialize_model(self, handler: SerializerFunctionWrapHandler, info: Serializ
728728
729729 value = getattr (self , field )
730730
731- if value and not isinstance (value , str ):
731+ if ( value is not None ) and not isinstance (value , str ):
732732 value = json .dumps (value )
733733
734734 if secret is None :
@@ -864,7 +864,7 @@ def serialize_model(
864864
865865 value = getattr (self , field )
866866
867- if value and not isinstance (value , str ):
867+ if ( value is not None ) and not isinstance (value , str ):
868868 value = json .dumps (value )
869869
870870 if secret is None :
@@ -2952,3 +2952,11 @@ def _handle_event(
29522952 )
29532953 self ._emit_aliased_event (event , "read_only_endpoints_changed" , response )
29542954 return
2955+
2956+ if "secret-tls" in _diff .added or "secret-tls" in _diff .changed :
2957+ logger .info (f"auth updated for { response .resource } at { datetime .now ()} " )
2958+ getattr (self .on , "authentication_updated" ).emit (
2959+ event .relation , app = event .app , unit = event .unit , response = response
2960+ )
2961+ self ._emit_aliased_event (event , "authentication_updated" , response )
2962+ return
0 commit comments