prawn-cake/simple-models

Updating model dictionary by key doesn't updates corresponding attribute of the model

grundic opened this issue · 1 comments

Here is an example:

class Dummy(Document):
    name = CharField()

dummy = Dummy(name='foobar')
assert dummy.name == 'foobar'
assert dummy['name'] == 'foobar'

dummy.name = 'baz'
assert dummy.name == 'baz'
assert dummy['name'] == 'baz'

dummy['name'] = 'boom'
assert dummy['name'] == 'boom'
assert dummy.name == 'boom'  # AssertionError

Fixed in v0.6.0