blueprints: Fixed bug causing blueprint instance context be discarded (#3990)

Fixed bug causing blueprint instance context be discarded when applying a blueprint.
This commit is contained in:
sdimovv 2022-11-12 12:23:33 +00:00 committed by GitHub
parent 2a47b7f474
commit 5d8dd9cf3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -85,11 +85,11 @@ class Importer:
self.__import = from_dict(Blueprint, import_dict) self.__import = from_dict(Blueprint, import_dict)
except DaciteError as exc: except DaciteError as exc:
raise EntryInvalidError from exc raise EntryInvalidError from exc
context = {} ctx = {}
always_merger.merge(context, self.__import.context) always_merger.merge(ctx, self.__import.context)
if context: if context:
always_merger.merge(context, context) always_merger.merge(ctx, context)
self.__import.context = context self.__import.context = ctx
@property @property
def blueprint(self) -> Blueprint: def blueprint(self) -> Blueprint: