A from-scratch atproto PDS implementation in Python (mirrors https://github.com/DavidBuchanan314/millipds)

don't clobber service variable in appview proxy

+7 -5
+7 -5
src/millipds/appview_proxy.py
··· 29 29 ) 30 30 if did_doc is None: 31 31 return web.HTTPInternalServerError( 32 - f"unable to resolve service {service!r}" 32 + text=f"unable to resolve service {service!r}" 33 33 ) 34 - for service in did_doc.get("service", []): 35 - if service.get("id") == fragment: 36 - service_route = service["serviceEndpoint"] 34 + for service_info in did_doc.get("service", []): 35 + if service_info.get("id") == fragment: 36 + service_route = service_info["serviceEndpoint"] 37 37 break 38 38 else: 39 - return web.HTTPBadRequest(text=f"unable to resolve service {service!r}") 39 + return web.HTTPBadRequest( 40 + text=f"unable to resolve service {service!r}" 41 + ) 40 42 else: # fall thru to assuming bsky appview 41 43 service_did = db.config["bsky_appview_did"] 42 44 service_route = db.config["bsky_appview_pfx"]