From f1e255b4d3abc9970198e3aa8037f758a38aa49b Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Wed, 30 Aug 2023 15:30:45 +0000 Subject: [PATCH] Add default to read_deleted in context's from_dict this is follow-up to Ic94323658c89df1c1ff32f511ca23502317d0f00 currently the defaults in __init__ and from_dict of RequestContext for read_deleted property are different: - in __init__ it is 'no' - in from_dict, it is effectively None. And at the same time, this property is not allowed to be None. As a result, the new _sanitize_context in oslo.messaging can not create a sanitized context copy with error read_deleted can only be one of 'no', 'yes' or 'only', not None Related-Bug: #2030976 Change-Id: Ifb660688c590fb1c32cbe0ae03e0ea444f19cbb8 --- manila/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manila/context.py b/manila/context.py index 27fd894745..b39e541d71 100644 --- a/manila/context.py +++ b/manila/context.py @@ -110,7 +110,7 @@ class RequestContext(context.RequestContext): project_id=values.get('project_id'), project_name=values.get('project_name'), domain_id=values.get('domain_id'), - read_deleted=values.get('read_deleted'), + read_deleted=values.get('read_deleted', 'no'), remote_address=values.get('remote_address'), timestamp=values.get('timestamp'), quota_class=values.get('quota_class'),