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

Setting Empty on an Entity field fails #22

Open
six8 opened this issue Oct 10, 2018 · 0 comments
Open

Setting Empty on an Entity field fails #22

six8 opened this issue Oct 10, 2018 · 0 comments

Comments

@six8
Copy link
Collaborator

six8 commented Oct 10, 2018

Setting Empty is allowed, but set tries to return the value that no longer exists.

    def set(self, instance, name, value):
        if value is Empty:
            if name in instance.__values__:
                del instance.__values__[name]
        else:
            instance.__values__[name] = self.adapt(value)
>       return instance.__values__[name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant