The model attributes are not accessible in some cases
Stranger6667 opened this issue · 1 comments
Stranger6667 commented
E.g this will work:
>>> bounces = postmark.bounces.all()
>>> bounces[0].From
test@example.com
But this will not:
>>> bounces = postmark.bounces.all()
>>> [bounce.From for bounce in bounces]
Traceback:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-36-31dfccff63a0> in <module>()
----> 1 [i.From for i in bounces]
<ipython-input-36-31dfccff63a0> in <listcomp>(.0)
----> 1 [i.From for i in bounces]
AttributeError: 'Bounce' object has no attribute 'From'
Possibly it is related to manipulations with __dict__
in the Model._update
method
Stranger6667 commented
From
is optional - it is not a bug