Commit 8ae3f59
authored
Avoid user assigning unimplemented fields on containers. (#102)
Before:
doc.trade.settlement.payment_means.type_code = "30"
was allowed but had no effect as payemnt_means is a container.
Now it gives:
Traceback (most recent call last):
File "/home/mdk/src/python-drafthorse/test.py", line 54, in <module>
doc.trade.settlement.payment_means.type_code = "30" # Virement
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Container' object has no attribute 'type_code' and no __dict__ for setting new attributes1 parent b3f9e39 commit 8ae3f59
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
| |||
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| |||
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| 90 | + | |
| 91 | + | |
82 | 92 | | |
83 | 93 | | |
84 | 94 | | |
| |||
0 commit comments