Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge doesn't resolve SpecialTag directives #143

Closed
yaythomas opened this issue May 11, 2019 · 0 comments
Closed

merge doesn't resolve SpecialTag directives #143

yaythomas opened this issue May 11, 2019 · 0 comments
Assignees
Labels
bug type: core core functionality

Comments

@yaythomas
Copy link
Member

>>> ctx['a'] = True
>>> ctx.merge({'a': PyString('False')})
>>> print(ctx)
{'a': PyString('False')}

Expected is True.

in merge, amend:

# str not mergable, so it doesn't matter if it exists in dest
                if isinstance(v, str):
                    # just overwrite dest - str adds/edits indiscriminately
                    current[k] = self.get_formatted_string(v)

to

# str not mergable, so it doesn't matter if it exists in dest
                if isinstance(v, str):
                    # just overwrite dest - str adds/edits indiscriminately
                    current[k] = self.get_formatted_string(v)
                elif isinstance(obj, SpecialTagDirective):
                    new = obj.get_value(self)

@yaythomas yaythomas added bug type: core core functionality labels May 11, 2019
@yaythomas yaythomas added this to To do in pypyr roadmap via automation May 11, 2019
pypyr roadmap automation moved this from To do to Done Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type: core core functionality
Projects
pypyr roadmap
  
Done
Development

No branches or pull requests

2 participants