Skip to content

Commit 09b55cb

Browse files
committed
fix: removed __internal__
1 parent e5a1cb7 commit 09b55cb

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

pyeudiw/trust/dynamic.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def _cache_upsert_source_trust_materials(
115115
return trust_source
116116

117117
def _upsert_source_trust_materials(
118-
self, trust_source: Optional[TrustSourceData], issuer: Optional[str] = None, force_update: bool = False
118+
self, trust_source: Optional[TrustSourceData], entity_id: Optional[str], force_update: bool = False
119119
) -> TrustSourceData:
120120
"""
121121
Extract the trust material of a certain issuer from all the trust handlers.
@@ -128,20 +128,15 @@ def _upsert_source_trust_materials(
128128
:rtype: Optional[TrustSourceData]
129129
"""
130130

131-
entity_id = issuer or "__internal__"
132-
133131
if not trust_source:
134132
trust_source = TrustSourceData.empty(entity_id)
135-
136-
if entity_id == "__internal__":
137-
return self._cache_upsert_source_trust_materials(trust_source, issuer)
138133

139134
if self.mode == "update_first" or force_update:
140-
return self._update_upsert_source_trust_materials(trust_source, issuer)
135+
return self._update_upsert_source_trust_materials(trust_source, entity_id)
141136
else:
142-
return self._cache_upsert_source_trust_materials(trust_source, issuer)
137+
return self._cache_upsert_source_trust_materials(trust_source, entity_id)
143138

144-
def _get_trust_source(self, issuer: Optional[str] = None, force_update: bool = False) -> TrustSourceData:
139+
def _get_trust_source(self, entity_id: Optional[str], force_update: bool = False) -> TrustSourceData:
145140
"""
146141
Retrieve the trust source from the database or extract it from the trust handlers.
147142
@@ -151,9 +146,9 @@ def _get_trust_source(self, issuer: Optional[str] = None, force_update: bool = F
151146
:returns: The trust source
152147
:rtype: TrustSourceData
153148
"""
154-
trust_source = self._retrieve_trust_source(issuer or "__internal__")
149+
trust_source = self._retrieve_trust_source(entity_id)
155150

156-
return self._upsert_source_trust_materials(trust_source, issuer, force_update)
151+
return self._upsert_source_trust_materials(trust_source, entity_id, force_update)
157152

158153
def get_public_keys(
159154
self,

0 commit comments

Comments
 (0)