File tree Expand file tree Collapse file tree
protocols/out_of_band/v1_0 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,6 +129,21 @@ def __repr__(self) -> str:
129129 self .__class__ .__name__ , self .backend , self .name
130130 )
131131
132+ def __eq__ (self , other ) -> bool :
133+ """Equality checks for profiles.
134+
135+ Multiple profile instances can exist at the same time but point to the
136+ same profile. This allows us to test equality based on the profile
137+ pointed to by the instance rather than by object reference comparison.
138+ """
139+ if not isinstance (other , Profile ):
140+ return False
141+
142+ if type (self ) is not type (other ):
143+ return False
144+
145+ return self .name == other .name
146+
132147
133148class ProfileManager (ABC ):
134149 """Handle provision and open for profile instances."""
Original file line number Diff line number Diff line change @@ -329,6 +329,7 @@ async def invitation_receive(request: web.BaseRequest):
329329 mediation_id = mediation_id ,
330330 )
331331 except (DIDXManagerError , StorageError , BaseModelError ) as err :
332+ LOGGER .exception ("Error during receive invitation" )
332333 raise web .HTTPBadRequest (reason = err .roll_up ) from err
333334
334335 return web .json_response (result .serialize ())
You can’t perform that action at this time.
0 commit comments