From 0e557b0100fdcc34fef53fbd092a2281949b826b Mon Sep 17 00:00:00 2001 From: Gavin Jaeger-Freeborn Date: Tue, 12 Nov 2024 14:38:52 -0800 Subject: [PATCH] Support null fields for metadata Signed-off-by: Gavin Jaeger-Freeborn --- oidc-controller/api/routers/oidc.py | 8 ++++++-- oidc-controller/api/templates/verified_credentials.html | 8 ++++---- oidc-controller/api/verificationConfigs/models.py | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/oidc-controller/api/routers/oidc.py b/oidc-controller/api/routers/oidc.py index c72a22d3..0706f09d 100644 --- a/oidc-controller/api/routers/oidc.py +++ b/oidc-controller/api/routers/oidc.py @@ -214,10 +214,14 @@ async def get_authorize(request: Request, db: Database = Depends(get_db)): "wallet_deep_link": wallet_deep_link, "title": ( ver_config.metadata.title - if ver_config.metadata + if ver_config.metadata and ver_config.metadata.title else "Scan with a Digital Wallet" ), - "claims": (ver_config.metadata.claims if ver_config.metadata else []), + "claims": ( + ver_config.metadata.claims + if ver_config.metadata and ver_config.metadata.claims + else [] + ), } # Prepare the template diff --git a/oidc-controller/api/templates/verified_credentials.html b/oidc-controller/api/templates/verified_credentials.html index 85f2503c..96c552ef 100644 --- a/oidc-controller/api/templates/verified_credentials.html +++ b/oidc-controller/api/templates/verified_credentials.html @@ -27,9 +27,9 @@ >🡸 Go back

{{title}}

- -
- +
+ +
Continue with: