While creating part in InvenTree, if the Create Stock switch is enabled and the stock info is entered, after clicking the Create Part button, the progress bar stucks in the middle and in console I can see this error:
[INFO] Success: Added new supplier part
Future exception was never retrieved
future: <Future finished exception=AttributeError("'list' object has no attribute 'get'")>
Traceback (most recent call last):
File "/usr/lib64/python3.12/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/kintree/.venv/lib64/python3.12/site-packages/flet_core/page.py", line 944, in wrapper
handler(*args)
File "/opt/kintree/.venv/lib64/python3.12/site-packages/kintree/gui/views/main.py", line 1457, in create_part
new_part, part_pk, part_info = inventree_interface.inventree_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/kintree/.venv/lib64/python3.12/site-packages/kintree/database/inventree_interface.py", line 775, in inventree_create
inventree_api.create_stock(stock)
File "/opt/kintree/.venv/lib64/python3.12/site-packages/kintree/database/inventree_api.py", line 225, in create_stock
return StockItem.create(inventree_api, stock_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/kintree/.venv/lib64/python3.12/site-packages/inventree/base.py", line 204, in create
return cls(api, data=response)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/kintree/.venv/lib64/python3.12/site-packages/inventree/base.py", line 82, in __init__
pk = data.get(self.getPkField(), None)
^^^^^^^^
AttributeError: 'list' object has no attribute 'get'
Example part no: 2N2222-ND on Digi-Key.
What's interesting is both the part and stock information get created correctly, without any noticeable discrepancies.
Software info
Ki-nTree 1.2.0, Python 3.12.11, InvenTree 1.0.2, Fedora 41.
While creating part in InvenTree, if the Create Stock switch is enabled and the stock info is entered, after clicking the Create Part button, the progress bar stucks in the middle and in console I can see this error:
Example part no:
2N2222-NDon Digi-Key.What's interesting is both the part and stock information get created correctly, without any noticeable discrepancies.
Software info
Ki-nTree 1.2.0, Python 3.12.11, InvenTree 1.0.2, Fedora 41.